stephen barncard wrote:
I know how to determine the *name* of the *stack file* that's holding a
loaded stack, but if one knows the *stack file name*, how does one get the
name of the stacks within?
get the substacks of stack "MyMainStack"
Does the whole stack have to be loaded first or is there a way to get the
names of the stacks inside a stackfile without loading it?
Depends on what you mean by "load".
To read any property of any part of a stack file will cause the entire
stack file to be loaded into memory. It will not, however, be "opened"
per se; that is, it won't trigger the preOpenStack, openStack, etc.
messages.
In fact, the only way you'd be able to know if it's been loaded into
memory is to check the mainStacks function.
Once it's in memory you can use the "delete" command to purge it.
IMPORTANT: the "delete" command doesn't actually delete the stack when
used on a mainstack, but instead merely purges it from memory. If used
on a substack, however, it will actually delete the substack.
To rectify this ambiguity I suggested the addition of a "purge" command
many years ago:
<http://quality.runrev.com/show_bug.cgi?id=3932>
--
Richard Gaskin
Fourth World
LiveCode training and consulting: http://www.fourthworld.com
Webzine for LiveCode developers: http://www.LiveCodeJournal.com
LiveCode Journal blog: http://LiveCodejournal.com/blog.irv
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode