Simple Scoping Question

David Burgun dburgun at dsl.pipex.com
Wed Apr 20 11:33:47 EDT 2005


>Hi Dave,
>
>>e.g. if Stack A
>>
>>does a start using start using stack "GlobalStack"
>>
>>and thean Stack A calls a Function in "GlobalStack" that refers to 
>>"this stack" does that refer to "Stack A" or "GlobalStack" ?
>>
>>Does this work the same way if the Stacks in question are both main 
>>stacks and does it work the same way in a Standalone Application?
>
>"This" always refers to "the currently selected", whether 
>referencing stacks, cards, groups, or individual controls. 
>Substitute
>'stack "GlobalStack"' for "this stack" in GlobalStack's stack script.
>
>Rob Cozens, Staff Conservator
>Mendonoma Marine Life Conservancy

Hi,

I am confused, in the case where "StackA" calls a Function in 
"GlobalStack", when in that function should "this stack" return 
"StackA" or "GlobalStack" ?

I want it to return "StackA" so that the functions are general.

Thanks a lot
Dave


More information about the use-livecode mailing list