put into named field weirdness

Dave dave at looktowindward.com
Wed Feb 13 10:54:40 EST 2008

On 11 Feb 2008, at 19:11, Russell Martin wrote:
> I do, inside of my
> openPrefsFile handler, open a separate stack stored on disk, but once
> that handler completes and execution returns to the line below it, how
> does the recently opened preferences stack then become the stack that
> is calling readPrefsFile?!? That doesn't make any sense.

 From a Stack Script using "this" does not always return the stack  
the Script is running in. In order to guarantee that you get the  
right stack use "me", or have a private function in the Stack Script  
that does this:

function GetStackName
return the name of this stack
end GetStackName

If "GetStackName" is called from the Same Stack Script it will return  
the correct name, since it was called by the same Script/Stack.

All the Best

More information about the Use-livecode mailing list