use-revolution Digest, Vol 79, Issue 33
tereza at califex.com
Sat Apr 17 23:21:56 EDT 2010
On Apr 17, 2010, at 12:25 PM, Peter Haworth wrote:
> Instead of passing in the name of the app stack, I found I could the use "the long name of this stack", eg:
> set the mainstack of stack "Structures" to the mainstack of the long name of this stack
I myself never trust "this stack" even when I'm totally utterly certain that I know what stack "this stack" will refer to when my handler is run. I tend to envision, subconsciously, "this stack" to be, well, "THIS stack", the stack the control is in, or the stack I have in mind, the stack in front of me. But to Rev, "this stack" is the default stack, and if your script wanders into a palette or modeless stack someday, "this stack" will refer to "that stack over there" and suddenly stuff is happening behind your back to the wrong stack! Having been bitten countless times, when I write library utilities now, I insist that the target of actions be specified explicitly, usually via a parameter.
Califex Software, Inc.
More information about the Use-livecode