On May 02, 2006, at 20:57 UTC, Mark O'Neill wrote:

> OK, so I'm saving the state of my array like this
> 
> MyCancelArray = MyActualArray

Well, actually, you're just saving an extra reference to your array.

> So, in the cancel button I have:
> 
> MyActualArray = MyCancelArray
> 
> ....to revert. Except, it doesn't.

Nope; it just copies the reference right back.  Probably these two references 
were both pointing to the same array anyway, so this line does nothing.

To save the actual contents of an array, there is no shortcut for looping 
through it and copying each item.

This is no different from doing obj1 = obj2; you're only copying the reference, 
not the data referred to.

Best,
- Joe

--
Joe Strout -- [EMAIL PROTECTED]
Available for custom REALbasic programming or instruction.

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to