How to set up a library?
bobsneidar at iotecdigital.com
Tue Dec 29 18:33:17 EST 2020
This is actually the only way. Besides Start Using a stack, which inserts the script of the target stack into back, if the script of a button is to be used as a library (or back/front script would be a better way to say it), insert into back or front is the way to do it. Otherwise setting the behavior of something will be persistent, but accomplishes the same thing really. It inserts the script of the object containing the behavior into the message path.
Behaviors are a little different however when referring to me or this me. These return empty when in a front of back script and return the target and behavior of the target respectively when used in a behavior script.
On Dec 29, 2020, at 11:34 AM, Ben Rubinstein via use-livecode <use-livecode at lists.runrev.com<mailto:use-livecode at lists.runrev.com>> wrote:
What is the best way to structure a library these days?
Currently I've got buttons with a script, and a 'mouseup' handler to 'insert the script of me into back' in my object library. But I don't think that's very modern.
What's the right way to do it? Especially if I want to share it?
More information about the use-livecode