Setting paths to Externals

Ken Ray kray at sonsothunder.com
Sat Nov 24 01:17:11 EST 2007


> besides. I don't see how you can dynamically load an external anyway, 
> since the docs state you have stop and restart your application. But 
> if you are loading them by script in a preopenstack or open stack 
> handler, then how will you ever activate them?

Trevor Devore taught me this method, and I've used it ever since for 
dynamic loading of externals:

1) Create a substack called "Externals" (or whatever) in your main 
stack for the sole purpose of dynamically loading/unloading externals.
2) When your application launches, whenever you want to load up the 
externals on demand (doesn't have to be in startup; can be at any time):
    2a) Do a "set the externals" of the *substack* to the externals you 
want to load
    2b) "Start using" the substack

As soon as the substack is "in use", the externals attached to the 
substack automatically load, and since the substack is now a library 
accessible by all the stacks that are running, the externals are *also* 
made immediately available to all currently open stacks.

HTH,

Ken Ray
Sons of Thunder Software, Inc.
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/



More information about the use-livecode mailing list