I recently wrote:
NOTE: a long-standing source of confusion and frustration with behaviors
is that the object holding the behavior script must be in memory when
any stack containing objects subscribed to it is loaded.

When behaviors are in the same stack file the engine figures it out on
its own.  But if the behaviors are in a separate stack file (regardless
of whether it's script-only or normal) that separate stack file must be
in memory first.

In some cases this can mean introducing a new stack only for the purpose
of loading your others so that they load in an order that will allow
behaviors to be resolved correctly.

Another option is to write a script that works on preOpenStack and walks
through each object setting the object's behavior property to the
object's behavior property, which forces resolution of the information
already known to the engine but not loaded in the finicky order it requires.

A request to simplify this has been submitted:
<http://quality.livecode.com/show_bug.cgi?id=8993>

I forgot to mention an even simpler way to make external stack files available, provided the first stack being loaded is a normal stack file (as opposed to script-only, which has no properties other than a script):

Just use the stackFiles property, adding any external stacks you like.

Apparently the stackfiles entries are loaded at the same time the stack containing those entries is loaded, and since they use relative paths they're fairly simple to work with.

--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 ____________________________________________________________________
 ambassa...@fourthworld.com                http://www.FourthWorld.com

_______________________________________________
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

Reply via email to