Bill-
So, the “myBehaviorLib” substack could be simply a script only stack that
contains some reasonable number of separate behavior type scripts, and once the
“start using” is invoked, say on a preopenStack script, all common code for
button behaviors becomes a single code element. Inheritance, like adding new
behavior is just adding another script to the “on doABehavior” handler in the
“myBehaviorLib” stack.
There's nothing wrong with what you're suggesting there.
But it's a different use case from behaviors.
Let's say you have a stack with 100 buttons on it.
You want four of those buttons to have common handlers, but not the
other 96 buttons.
You could write the handlers for one button and copypasta them into the
other three similar buttons.
Or... you could throw the common handlers into a behavior script and
link all four buttons to that object, no matter whether it's a button or
a script-only stack.
The idea is that you have the common handlers in one place for easy
maintenance and limited inheritance instead of global handlers. There's
a need for both, but they're different.
--
Mark Wieder
ahsoftw...@gmail.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