Simple Scoping Question

David Burgun dburgun at dsl.pipex.com
Wed Apr 20 12:41:48 EDT 2005


Hi,

That's how I thought it would work. I am getting very strange results 
from code that does this tho. Could the Current Stack be being lost 
as a result of calling "Answer" or put xxx into msg box?

Thanks
Dave


>Hi Dave,
>
>In any script of stack A, if you call a function placed in the 
>script of stack B, *this* will refer to stack A since your script 
>has been initiated in stack A.
>Function or handler places do not matter.
>The only important point is: from where do I began :-)
>
>Le 20 avr. 05, à 17:33, David Burgun a écrit :
>
>>>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.
>
>Amicalement,
>
>Eric Chatonet.
>----------------------------------------------------------------
>So Smart Software
>
>For institutions, companies and associations
>Built-to-order applications: management, multimedia, internet, etc.
>Windows, Mac OS and Linux... With the French touch
>----------------------------------------------------------------
>Web site		http://www.sosmartsoftware.com/
>Email		eric.chatonet at sosmartsoftware.com/
>Phone		33 (0)1 43 31 77 62
>Mobile		33 (0)6 20 74 50 86
>----------------------------------------------------------------
>
>_______________________________________________
>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