|
-
[F8] Annoying problem with arrays in different class instances!!
Can't believe this! The fact that arrays are always sent by reference was bad enough, and now this! An array that belongs to a class seems to be shared by all instances, if not told otherwise!
I have a couple of arrays in the class, and most of them is set upon creation with Attachmovie ... {thisArray:thatArray and so on}
but I had an array that was defined inside of the constructor, and when the second instance was created, this very array had the same values as the previous instance! Why can't each instance have it's own arrays, when they're private and all!
I seem to have solved the problem by writing Attachmove ... {theotherArray:new Array() }
still, weird....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|