Where goes stacks, included stacks and externals? (was Dialogs inlibrary organization)
J. Landman Gay
jacque at hyperactivesw.com
Thu Feb 5 22:19:11 EST 2004
On 2/5/04 5:52 PM, Dar Scott wrote:
> On Thursday, February 5, 2004, at 04:14 PM, J. Landman Gay wrote:
>> I don't think there is an official established procedure, but I'd put
>> all my library stacks together in one folder. When it was loading
>> time, I'd set the directory to that folder and start using them.
>
> Do you start using everything in the folder or do you use a list? Do
> you generate the list by hand?
Well, again, I don't really work this way much so it has never been an
issue. I tend to embed everything as backscripts, or at the most, I have
one external library. Even then, I tend to want to make the stack
library into a substack just to make sure it is always available.
But see below. When I start using a library depends a lot on how much
and when I need to use it.
>> There is another, perhaps more efficient, way to use libraries though,
>> and it is the way used by Revolution itself. Store the libraries as
>> button scripts somewhere (in a substack, or a card you never go to, or
>> even just invisible on a card somewhere) and insert the scripts into
>> the back as necessary.
>
> Won't this run into the ten backscript limit?
Yes. I have never needed very many backscripts though. I'm curious what
you might build where you'd need so many. Since I don't work that way
I'm having trouble picturing a reason to. Most of my stuff is so
customized that I rarely need a lot of generic libraries.
> Suppose a library supplier wants to encrypt the library?
Good point. I guess in that case you'd need a substack or an external stack.
> What's a good way to insert these? Explicitly at preOpenStack?
I usually do it then, or on openstack, or else just before I need to use
the library. I had a project that worked with XML a lot, and I started
using a library on preOpenStack because I knew it would be in constant
use. I had another project where I only needed a library in one
particular handler, which might or might not ever run, so in that case I
checked the stacks in use at the top of the handler; if it wasn't in
use, I started using it.
> I guess this would not apply to libraries needing menu or dialog substacks.
True.
--
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode
mailing list