How/When are behavior references resolved?

Pete pete at mollysrevenge.com
Fri Jul 15 16:29:13 EDT 2011


I'm having a problem with behaviors not being resolved in my application
stack.

I have two stack files, lets call them library.livecode and
application.livecode.  The script of the main stack of library.livecode has
handlers that I use in application.livecode by issuing a "start using"
command.

library.livecode also contains a substack named Behaviors whose card has a
bunch of buttons whose scripts I want to use as behaviors in
application.livecode butthe "start using" command doesn't seem to make the
behaviors available to the controls in application.livecode, by which I mean
they act like they don't have a behavior defined.

I can fix this by setting the stackFiles of the main stack of
application.livecode to "Behaviors,<path to library.livecode>".  I have to
reference the Behaviors substack, not the main stack of library.livecode for
this to work.

I guess I'm wondering if this is the appropriate way to deal with this
situation or if there's a cleaner way to do it.


Pete
Molly's Revenge <http://www.mollysrevenge.com>



More information about the use-livecode mailing list