Clearing local variables
dunbarx at aol.com
dunbarx at aol.com
Fri Apr 22 16:47:26 EDT 2016
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 <stephenREVOLUTION2 at barncard.com>
To: How to use LiveCode <use-livecode at lists.runrev.com>
Sent: Fri, Apr 22, 2016 4:06 pm
Subject: Re: Clearing local variables
On Fri, Apr 22, 2016 at 12:48 PM, Sannyasin Brahmanathaswami <
brahma at hindu.orgbrahma@hindu.org> 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
use-livecode at lists.runrev.comlivecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list