Stack Context/Scope Question
Ken Ray
kray at sonsothunder.com
Wed Dec 7 14:09:39 EST 2005
On 12/7/05 6:56 AM, "Eric Chatonet" <eric.chatonet at sosmartsoftware.com>
wrote:
> 2. "This" refers generally to to a card or a stack and refers to the
> card or the stack that initiated the process.
> Then if the current running handler was called from the current
> stack, "this" will refer to it but when called from another stack (a
> substack for instance), "this" will refer to this another stack (the
> substack).
One thing to add is that that "this" always refers to the stack that is the
defaultStack, and when you open other stacks, *they* become the
defaultStack, so if you do this:
on mouseUp
set the defaultStack to "Test"
put the short name of this stack -- puts "Test"
set the defaultStack to "Another Test"
put the short name of this stack -- puts "Another Test"
open stack "Third Test"
put the short name of this stack -- puts "Third Test"
end mouseUp
HTH,
Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: kray at sonsothunder.com
More information about the use-livecode
mailing list