Can use assign multiple behaviors to a single object?

Sannyasin Brahmanathaswami brahma at hindu.org
Thu Aug 11 17:10:44 EDT 2016


Pursuant to the new text only script architecture possibilities:

e.g. Group "portal-links"

Can we assign more than 1 behavior to this(any) group(object)?

Rumors are that it is possible. But, the IDE does not support it. Or at least the current property inspector UI as it looks today, does not support it.

Manual assignment via script or msg box implementation would imply that doing

"set the behavior of [some object] to the long id of [someObject/textOnlyScript]"

effectively replaces the one and only assigned behavior.

OTOH it does seem useful if you want more robust encapsulation of vars and methods

vs overloading the global space with vars and methods from multiple backscripts and libs added to the msg path by 'start using'

Comments?

But first, is it doable at all (2+ behaviors assigned to one object)?

A snake pit of behaviors that are all encapsulated seems less venomous than a snake pit of stack/libs/scripts that are a live and globally "hot" in the message hierarchy.

Of course one does have the added burden of making the behavior assignment, but this seems a trivial burden when behaviors are encapsulated vs debugging a global message path comprised 50 plus backscripts/stack scripts\

BR



More information about the use-livecode mailing list