|
klerindias Novice
Joined: 23 Jan 2010 Posts: 37
|
Posted: Tue May 29, 2012 11:25 pm
class |
Hi,
How to disable class from different window or package? |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Wed May 30, 2012 1:47 am |
Usually you want to avoid that. Can you explain why you think you want to do this? Perhaps there is a better way to achieve the result you want.
If you absolutely have to do it, you can specify a full path name which includes the name of the module, but you have to ensure that the module the script is in can actually view the target module. But a better solution might be an Event.
In the script which you want to cause the disable, use the command:
Then, somewhere in the module which holds the class you want to turn off, create a new Event with the name TurnOff, which executes the #T- command. You can create the Event in the package editor, or with the #EVENT command on the command line.
In case you are familiar with Events, you can think of them as a special kind of trigger. When you execute "#RAISE Eventname", you will cause [i]every[i] event with that name to execute (as long as it is enabled), in every module and window, in order by priority. It is especially useful for communicating between modules, or between scripts when you don't know in advance whether anything will actually react. A common use is for prompts. You can create a trigger prompt which executes a #RAISE, possibly with additional parameters extracted from the prompt line. Then you can at will create events in other modules (or the same module) which will execute on the prompt. You don't need a dozen triggers all parsing the prompt line--you just have one, which causes as many events to execute as you need. |
|
|
|
klerindias Novice
Joined: 23 Jan 2010 Posts: 37
|
Posted: Thu May 31, 2012 8:11 pm |
Thank you for help, i found diffrent way to do it just sharing variables.
|
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|