Hey back again.

Here's a tip on deleting elements from an array:

You might expect the following to delete "firstElement":

on mouseUp
   put 100 into myArray["firstElement"]
   put 200 into myArray["secondElement"]
   delete myArray["firstElement"]
   put the keys of myArray
end mouseUp

...however if you are not explicit, delete assumes a global array.  You 
need this:

on mouseUp
   put 100 into myArray["firstElement"]
   put 200 into myArray["secondElement"]
   delete local myArray["firstElement"]  # <-- local has been added
   put the keys of myArray
end mouseUp

A small snag that trapped me up tonight.  Useful to know anyway and not 
in docs.

Chow and good night.

M@

Matt Denton

_______________________________________________
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to