Script Only Stack Behaviors and Nesting

Bob Sneidar bobsneidar at
Tue Jul 3 01:12:38 CEST 2018

Yes, but I am not talking about the child object's script. That works fine. What doesn't work are script locals in the behavior itself. 

Bob S

> On Jul 2, 2018, at 12:17 , J. Landman Gay via use-livecode <use-livecode at> wrote:
> They do retain independent values, one set of script locals for each instance. For example, if you have two buttons that use the same behavior, button 1 will retain its script local values and button 2 will retain its own (different) set of values.
> On 7/2/18 1:42 PM, Bob Sneidar via use-livecode wrote:
>> Okay, so apparently I cannot use script local variables in a behavior. Setting the variables in a handler in a behavior script does not retain the values when that handler exits, like they do in a normal object script. Should they?
>> The workaround for me is to simply get the custom property of each stack (an array in each stack containing all the values I need) and then reference the array values directly instead of trying to set script local values. The downside to this is I have to get the array in every handler in the behavior script. Not a big deal, but I was trying to be efficient by only having to initialize the values once upon every openStack.
>> Bob S

More information about the use-livecode mailing list