Do script-only stacks support "chained" behaviors?

Geoff Canyon gcanyon at gmail.com
Sat Jan 20 17:51:44 EST 2018


This page http://livecode.wikia.com/wiki/Behavior describes "chained"
behaviors, saying that button 1 can have button 2 as its behavior, and if
button 2 has button 3 as *its* behavior, then button 1 will have access to
the handlers in both button 2 and button 3.

This seems to work in LC 8.1.8, although chained behaviors seem to be
somewhat brittle -- I'm seeing that sometimes closing and opening a stack
causes button 1 in the above example to inherit from button 2, but not from
button 3.

SO: is there a way to support this for script-only stacks? As far as I
know, script-only stacks only support defining the name and script of the
stack, and no properties at all, i.e. no ability to set a behavior for the
script-only stack. So in the above example, button 3 could be replaced by a
script-only stack, but button 2 could not (without losing the inheritance
from button 3).

Is that correct?

gc



More information about the use-livecode mailing list