defaultStack Scope

Dan Shafer dan at danshafer.com
Fri Jul 12 18:16:01 EDT 2002


>Recently, "Dan Shafer"  wrote:
>
>>>  Doesn't work that way on my machine (WinXP). Open Rev -> Create New Stack
>>>  and name it "foo". Type:
>>>
>>>  put the defaultstack
>>>
>>>  into the messagebox
>>>
>>>  returns:
>>>
>>>  stack "foo"
>>
>>  OK. Are you starting clean? I'm in a situation where there is a
>>  mainstack open, along with two substacks. If I have the mainstack
>>  open and I type
>>
>>  set the defaultStack to "foo" (not the name, but...)
>>
>>  into the message box and then immediately type
>>
>>  put the defaultStack
>>
>>  I get the name of the mainstack.
>
>I believe defaultStack is a global property that operates locally.  So, if
>you type in the message box:
>
>   set the defaultStack to "foo";put the defaultStack
>
>You should get "foo".
>
>In other words, once a handler is done executing, the defaultStack is reset
>to the top stack.  Since you typed your test scripts separately in the
>message box. The defaultStack was reset by the time you queried it.

That appears to be correct. That will work OK where I need this capability.

Thanks, Scott!

>Regards,
>
>Scott Rossi
>Creative Director
>Tactile Media, Multimedia & Design
>-----
>E: scott at tactilemedia.com
>W: http://www.tactilemedia.com
>
>_______________________________________________
>use-revolution mailing list
>use-revolution at lists.runrev.com
>http://lists.runrev.com/mailman/listinfo/use-revolution


-- 
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
Dan Shafer
Technology Visionary - Technology Assessment - Documentation
"Looking at technology from every angle"
http://www.danshafer.com
831-392-1127 Voice - 831-401-2531 Fax



More information about the use-livecode mailing list