Next Behaviors - Scope of Variables
brahma at hindu.org
Wed Apr 25 10:18:04 EDT 2018
I just implemented by first use of nested behaviors. Marvelous!
But it occurred to me right away, that I could use variables which were "local", in the sense that their scope was within the context of the nested arrays. Of course needed to declare the inside the behavior, otherwise you get confused, but they are no globals.
I have nested "behavior_ListenUI"
# a generic UI that words of several cards
# just for this one card.
# On this card I am forced to use local set up "silly handlers"
on passAudioSelection pLine,pTitle
# because the startPlayer behavior is on the "generic" "behavior_ListenUI"
but if "sDownloadAudioA" was available to "behavior_ListenUI"
I won't need to passAudioSelection pLine,pTitle
instead, I just declare the
on the mouseup handler it to a straight
I hope that makes sense… if could post the entire scripts if it doesn’t .
More information about the Use-livecode