Behaviors not honoring script local variables??

Bob Sneidar bobsneidar at
Tue Jun 26 16:13:30 EDT 2018

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