  | |  | variable initialization bug? | variable initialization bug?
2004-02-18 - By Jason Hickner
Back Is this a huge bug, or am I missing something?
Arrays initialized inline like this, in the class definition:
class myClass {
public var a = [];
}
Seem to be automatically set to static. You can test it by copying the
above code into a file called myClass.as, and then running this code
from frame 1 in a flash movie:
import myClass;
c1 = new myClass();
c1.a.push( "big bug ");
c2 = new myClass();
trace(c2.a);
The output is: big bug
Thoughts?
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
Supported by Fig Leaf Software
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
Be sure to check the archives and the wiki:
http://chattyfig.figleaf.com/
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
http://chattyfig.figleaf.com/cgi-bin/ezmlm-cgi?1:mss:104565
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
To unsubscribe send a blank e-mail to:
Normal Mode: flashcoders-unsubscribe@(protected)
Digest Mode: flashcoders-digest-unsubscrive@(protected)
|
|
 |