Accessing stacks without opening

Phil Davis revdev at pdslabs.net
Mon Apr 26 22:18:02 EDT 2010


Hi Marty,

When you reference a stack that is not open, it is brought into memory. 
Even this will do it:

     -- set 'it' to true or false
     get (there is a stack "abc") -- looks in the default folder for the 
stack

Or you can reference the stack by its filename.

When a stack file is brought into memory this way, none of the normal 
preOpen / open messages are sent to it or its parts. AND visible stacks 
are not shown. You can definitely use this to your advantage in certain 
cases! It is not bad form. The important thing is that you know what's 
happening.

Phil Davis



On 4/26/10 6:47 PM, Marty Knapp wrote:
> So it appears that you can set custom properties of a stack and "put" 
> information into fields of stacks that are not open, from a stack that 
> is open. I just did it by accident! That being the case, is there 
> anything that I should be aware of when doing this? Is the referenced 
> stack loaded into memory? Is this considered bad form?
>
> Thanks,
> Marty Knapp

-- 
Phil Davis

PDS Labs
Professional Software Development
http://pdslabs.net




More information about the use-livecode mailing list