Why Chained Behaviors May Be A Bad Idea

mwieder ahsoftware at sonic.net
Mon Sep 12 19:20:28 EDT 2016


Sannyasin Brahmanathaswami wrote
> but the example was  
> 
> Parent X (a behavior for)
>     Child Y and Child X, 
> where Child X was also a behavior for 
>      Child A

Hopefully that's a typo and not a circular reference.
So

    A
    |
B----C
        |
        D

Is perfectly reasonable. B has access to A, C has access to A, D has access
to C and A. But not B.

To use a textbook example,
if A=shape, B=circle, C=triangle, and D=right triangle
you wouldn't expect (or want) a right triangle to inherit anything from
circles, but any changes to triangle should be accessible from right
triangles. You might want all circles to be blue and all triangles to be
red. Those would be handlers in the B and C scripts. You could then have all
right triangles be black (in the D script), and that wouldn't affect other
types of triangles.



-----
-- 
 Mark Wieder
 ahsoftware at gmail.com
--
View this message in context: http://runtime-revolution.278305.n4.nabble.com/Why-Chained-Behaviors-May-Be-A-Bad-Idea-tp4708303p4708354.html
Sent from the Revolution - User mailing list archive at Nabble.com.




More information about the use-livecode mailing list