How to pass a message to a substack (or back)?

Lynch, Jonathan bnz2 at cdc.gov
Fri Aug 26 13:48:00 EDT 2005


Also - if you were to use global variables, they should work.

Just remember that they need to be delcared for each script.

Button in Substack:

On Mousedown
 Global myGlobalVar
 Put "5" into myGlobalVar
End Mousedown



Button in mainstack:
On mousedown
  Global myGlobalVar
  Answer myGlobalvar
End mousedown



With the above configuration, if you press the button in the substack first, the information will be retrieved from the global variable when you press the button in the mainstack. Notice how myGlobalVar is declared as a global in both scripts - this is necessary.

-----Original Message-----
From: use-revolution-bounces at lists.runrev.com [mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of Gajo Csaba
Sent: Friday, August 26, 2005 1:23 PM
To: use-revolution at lists.runrev.com
Subject: How to pass a message to a substack (or back)?



Hi,

I have the main stack, and when I want to add a new item to a list a 
new dialog/substack is opened. Here the user can enter some 
information, and when he clicks on the OK button I want to send that 
information back to the main stack, so it would appear in the list. How 
can I do it?

I tried declaring a variable global but it seems I overestimated its 
globality, cause the other script can't see it. I also tried creating a 
message in one stack, and then I call that from another stack, but the 
message can't be found from there.

How can I do this?

Thanks, Csaba

_______________________________________________________________________
[freemail] extra 1GB-os postafiókkal, Önnek már van? http://freemail.hu


_______________________________________________
use-revolution mailing list
use-revolution at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution





More information about the use-livecode mailing list