Script Only Stack Architecture

BNig bernd.niggemann at uni-wh.de
Thu Mar 31 13:01:41 EDT 2016


Richard Gaskin wrote
> In just 11 steps, each taking only a few seconds, you've just created a 
> rich hierarchy of custom messaging:
> 
>        "A" "B" "C"
>          \  |  /
>           \ | /
>          MyClass
>             |
>             |
>       MySuperClass
> 
> 
> If you wanted the drag behavior used for an entirely different set of 
> objects that do something else on mouseUp, you could make another button 
> named "MyOtherClass" and extend your scope of custom controls even
> further:
> 
>   "A" "B" "C" "D" "E" "F"
>     \  |  /     \  |  /
>      \ | /       \ | /
>     MyClass   MyOtherClass
>         \         /
>          \       /
>         MySuperClass
> 
> Behaviors can be chained as deeply as you like, allowing for very rich 
> class hierarchies.
> 
> This will get you started.  And it only takes a few minutes to explore.

I agree with Richard that behaviors are extremly powerful, especially the
nested behaviors.

But if you want to use this feature dynamically, i.e. to assign a superclass
on runtime and remove it on runtime, which is just the logical extension of
using nested behaviors then you currently have to consider
http://quality.livecode.com/show_bug.cgi?id=17220
(includes a sample stack showing setting a class and superclass)
removing a superclass behavior does not become immediately effective.
You would have to set the class behavior anew.

I hope I made a valuable contribution to confuse everybody and his cat :)

Kind regards
Bernd




--
View this message in context: http://runtime-revolution.278305.n4.nabble.com/Script-Only-Stack-Architecture-tp4702715p4702873.html
Sent from the Revolution - User mailing list archive at Nabble.com.




More information about the use-livecode mailing list