Maintaining scripts and groups in library files
Rob Cozens
rcozens at pon.net
Tue Jul 2 23:51:01 EDT 2002
Hi Dar,
>I want to maintain a handful of libraries to be used by several
>mainstacks. I am beginning to think these should not be substacks
>but separate mainstacks found by stackfiles.
>
I have yet to play with stackFiles, but my first impression is that
the mechanism is basically a means of manipulating information in a
stack without opening it, and that "start using" is more appropriate
for your purpose. There is a third option : You can make your
libraries substacks of a main library stack. The library stack can
be bundled in the standalone or distributed as a separate file.
>Can I refer to all objects and handlers of a stack just by virtue of
>stackfiles? Can I "call" a handler in such a stack if I don't want
>to use "start using"? I don't want my standalones to go over the 50
>limit for "start using".
Again, I have not tried this but it seems to me once you have
"set the stackFiles of stack someStack to myStackList",
you should be able to address any object in any stack in myStackList
by name without specifically opening the stacks.
With regards to calling a handler, I think the answer is "no". Note
the description of the stackFiles property says "The stackFiles
property specifies a list of stacks and their file names, to be used
when a stack that's not open is referenced in a handler." In other
words, if your standalone has a handler statement like "put
mySpecialFunction() into field 1 of card 1 of stack someClosedStack",
the engine will look for mySpecialFunction in stacksInUse, and will
only check stackFiles for someClosedStack.
>If I use a stack through stackfiles in a mainstack, is there an easy
>way to make it part of the standalone built from the mainstack? A
>not-so-easy way?
A. You should be able to bundle them with the main app or distribute
them as separate files: just have the main app include them in its
stackFiles.
>
>Do I need to make sure that all stacks used directly and indirectly
>have unique names? That is, suppose I use several stacks through
>stackfiles and each of these have several substacks used as dialog
>boxes, can these have the same name? Can a mainstack be used as a
>qualifier to specify a substack?
Best test this one. I don't see how including a mainStack in the
stackFiles brings it's substacks into play...
>
>Do substacks "see" the stackfiles of the mainstack?
According to the Rev Dictionary, yes they do.
>
>Do substacks of mainstacks set in "start using" count as the 50
>limit for standalones?
I doubt it, as I don't think handlers in substacks of stacks in use
are accessible without putting the substacks in use also.
>
>Can I place a group on a card in one stack and that group is defined
>and maintained by a stack found through stackfiles?
If you mean, can one change a group in one stack and have the changes
automatically apply to any stack that adds the first stack to its
stackFiles, I think not.
--
Rob Cozens
CCW, Serendipity Software Company
http://www.oenolog.com/who.htm
"And I, which was two fooles, do so grow three;
Who are a little wise, the best fooles bee."
from "The Triple Foole" by John Donne (1572-1631)
More information about the use-livecode
mailing list