before vs on in behavior scripts - red herring alert!

Peter Haworth pete at lcsql.com
Thu Mar 20 14:14:58 EDT 2014


On Thu, Mar 20, 2014 at 8:54 AM, Richard Gaskin
<ambassador at fourthworld.com>wrote:

> For example, if you have a mainstack which is an executable and contains
> objects that use behaviors, and a separate library stackfile which contains
> the behavior buttons, it will always fail because that mainstack is opened
> before the library is loaded, so the resolution will be attempted before
> the objects they resolve to can be known.
>
> The workaround is as you've discovered: you have to write code to reassign
> the behavior on the fly.
>

I wasn't aware of this issue but completely by chance I worked around it by
making my library stack a substack of the mainstack which uses it.  Of
course that won't work for all circumstances but happens to work for me.

Pete
lcSQL Software <http://www.lcsql.com>
Home of lcStackBrowser <http://www.lcsql.com/lcstackbrowser.html> and
SQLiteAdmin <http://www.lcsql.com/sqliteadmin.html>



More information about the use-livecode mailing list