This seems easy and it is, but I always seem to forget it. Instead of having to recall it out of memory I thought I would add it to the blog. It's super simple code, so here it goes.
Quick Explanation:I populate an array (or group) and now I want to repopulate that array. Here's the problem. If the first time I fill up 92 elements and then I try to repopulate it with 61 I still have 31 of my old arrays populated. The trick is to go through and delete out the array prior to repopulating it.
Simple as this:
while 0 < this.arrayName.count do
delete this.arrayName[this.arrayName.count-1]
end
11.04.2008 | Posted by Niki Adams at 3:15 PM |
clearing out an array
Labels: Tips and Tricks
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment