Behaviors not honoring script local variables??

Bob Sneidar bobsneidar at
Tue Jun 26 16:19:12 EDT 2018

Works with globals, but not script locals. 

Bob S

> On Jun 26, 2018, at 13:13 , Bob Sneidar via use-livecode <use-livecode at> wrote:
> Hi all. 
> I have a behavior script with a handler:
> local cTableName, cDGName, cPriKey, cAltTable1
> on getStackConstants pParentStack
>   -- retrieve stack constants from stack property
>   put the stackConstants of pParentStack into aStackConstants
>   put the keys of aStackConstants into tConstantList
>   repeat for each line tConstant in tConstantList
>      do "put " & quote &  aStackConstants [tConstant] & quote & " into " & tConstant
>   end repeat
> end getStackConstants
> When I trace the handler, it does indeed set the values for the local variables, but as soon as the handler exits, the script local variables are all reset! This does not happen when I do the same thing in an object script. Is there something about behaviors preventing script local variables from retaining their values??
> Bob S

More information about the Use-livecode mailing list