| 1 | -- custom_Utilities |
|---|
| 2 | ----------------------------------- |
|---|
| 3 | -- PROPERTIES: |
|---|
| 4 | --!memberProperties: [#name: "custom_Utilities", #scripttype: #parent, #scriptSyntax: #lingo, #comments: "~/Documents/Scripts/lingo/commonMovieScript.ls"] |
|---|
| 5 | -- |
|---|
| 6 | -- DESCRIPTION: |
|---|
| 7 | -- you can use the utility handlers from script alexUtilities in this script, as it uses it as ancestor. |
|---|
| 8 | -- |
|---|
| 9 | -- REQUIRES: |
|---|
| 10 | -- script "alexUtilities" -> ancestor -> basic function provider |
|---|
| 11 | -- |
|---|
| 12 | -- USAGE: |
|---|
| 13 | -- define the handlers, which are provided in the Utilities menu and defined in script "OSCmenu_Utilities" |
|---|
| 14 | -- |
|---|
| 15 | -- |
|---|
| 16 | -- if you want to display a status for long calls (like my svn utilities do) |
|---|
| 17 | -- use: |
|---|
| 18 | -- me.mSwitchToStatusMode(1) -- to switch it on |
|---|
| 19 | -- me.mSwitchToStatusMode(0) -- to switch it off |
|---|
| 20 | -- and: |
|---|
| 21 | -- me.mDisplayWaitStatusText(aString) -- to display a status message |
|---|
| 22 | -- |
|---|
| 23 | -- |
|---|
| 24 | -- WARNINGS: |
|---|
| 25 | -- keep in mind, that you are in the scope of the stage, when these hadlers here are called! |
|---|
| 26 | -- so calling a script of this movie "Handlermenu" here is only possible, if you use a "tell" statement |
|---|
| 27 | -- use it like so: tell window(me.pHandlerMenuWindowName) to doSomething |
|---|
| 28 | ----------------------------------- |
|---|
| 29 | |
|---|
| 30 | property ancestor |
|---|
| 31 | |
|---|
| 32 | on new me |
|---|
| 33 | ancestor = new(script "alexUtilities") |
|---|
| 34 | return me |
|---|
| 35 | end |
|---|
| 36 | |
|---|
| 37 | -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
|---|
| 38 | on _______________CUSTOM_UTILITIES me |
|---|
| 39 | end |
|---|
| 40 | -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
|---|
| 41 | |
|---|
| 42 | on Add_Your_Own_Handler_Here me, paremeters |
|---|
| 43 | |
|---|
| 44 | ---------------------------- |
|---|
| 45 | -- me.mSwitchToStatusMode(1) |
|---|
| 46 | -- me.mDisplayWaitStatusText("A really long time consuming procedure...") |
|---|
| 47 | ---------------------------- |
|---|
| 48 | |
|---|
| 49 | -- your code here: |
|---|
| 50 | alert "This is an example handler." |
|---|
| 51 | |
|---|
| 52 | |
|---|
| 53 | ---------------------------- |
|---|
| 54 | -- me.mSwitchToStatusMode(0) |
|---|
| 55 | ---------------------------- |
|---|
| 56 | |
|---|
| 57 | end |
|---|