Update a global when going to a stack as modal

Sarah Reichelt sarahr at genesearch.com.au
Wed Jan 7 17:42:45 EST 2004


Are you sure you are declaring gFoo as a global in BOTH places?
If you forget the "global gFoo" line in the script of stack B, then it 
won't change the value of the real global, just a local variable of the 
same name.

Similarly, if you don't have the global declaration in stack A, then it 
will be using a local variable which will not be affected by setting a 
global of the same name in stack B.

Cheers,
Sarah
sarahr at genesearch.com.au
http://www.troz.net/Rev/

On 8 Jan 2004, at 7:42 am, Mark Powell wrote:

> I have a handler in stack A of the pseudo form below
>   ...
>   LINE 1 <put "Before" into global gFoo>
>   LINE 2 <go to stack B as modal; user input there goes into gFoo>
>   LINE 3 <put gFoo into fld "Information" of stack A>
>   ...
>
> The text that is put into the field on stack A is inevitably "Before".
> However, if I immediately type
>
>   put gFoo into fld "Information"
>
> the data that was collected in stack B is put into the field in stack 
> A as
> expected.  The global is populated as I would want, except it is as if 
> line
> 3 above is run before line 2.  What is going on?  Can I not switch 
> between
> stacks and collect data?  Is there a workaround?
>
> Mark
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>
>



More information about the use-livecode mailing list