You've declared an Array var which is automatically initialized to
'null' -- it isn't yet a reference to an actual Array object. You need
to write
var incorrects:Array = [];
to initialize it to an empty (i.e., 0-element) Array instance.
Gordon Smith
Adobe Flex SDK Team
________________________________
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of [EMAIL PROTECTED]
Sent: Thursday, January 17, 2008 10:45 PM
To: [email protected]
Subject: [flexcoders] using an array
I thought I knew how to do this but it seems like everything little
thing I do makes errors.
var incorrects:Array;
incorrects[2]='asdf';
TypeError: Error #1009: Cannot access a property or method of a null
object reference.
What is the matter ?