If I understand what you are asking, step through this:


on mouseUp
   put 
"tAllCats,tCatsTree,tRootCats,aAllCatsArray,aCatsByParent,aCatsByChild,tAllChildren"
 into tLocalVars
   repeat for each item x in tLocalVars
      do "put random(999) into" && x 
   end repeat


   breakpoint


    repeat for each item x in tLocalVars
      do "put empty into" && x 
   end repeat
end mouseUp


The first part loads, the second part empties. 



-----Original Message-----
From: stephen barncard <[email protected]>
To: How to use LiveCode <[email protected]>
Sent: Fri, Apr 22, 2016 4:06 pm
Subject: Re: Clearing local variables

On Fri, Apr 22, 2016 at 12:48 PM, Sannyasin Brahmanathaswami <
[email protected][email protected]> wrote:

>  repeat for each item x in tLocalVars
>       put empty into x
>    end repeat
>

you  don't want to mess with the index variable in a repeat loop

repeat for each item x in tLocalVars
      put empty into item x of tLocalVars
   end repeat

in addition you may have to do the deleting backwards

not tested... some ideas

Stephen Barncard - Sebastopol Ca. USA -
mixstream.org
_______________________________________________
use-livecode mailing list
[email protected][email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to