Peter Haworth wrote:
Has anyone got any real world examples of the benefits of the new chained
behaviors feature?

I just read the latest newsletter article about them and while I understand
the concept,  I didn't see benefit in the example scenario over a single
behavior with some common logic and a switch statement to handle the logic
specific to each "sprite".

It obviates the switch statement.

We could take this question one step back and ask why we'd want behaviors at all, when we could just use frontScripts with switch statements instead.

But that thought experiment (hopefully) makes the case for behaviors clear.

Nested behaviors simply extend the value of such a mechanism, at long last giving xTalk one of the most valuable aspects of OOP: subclasses.

--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

_______________________________________________
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

Reply via email to