one more. i think "result" is depricated in favor of "resultEvent."
give it a try and see if that works.
Bill Slusser
678•770•4470
1105 Cobb Xing
Smyrna, Georgia 30080
On May 15, 2008, at 10:02 AM, Kyle Patterson wrote:
Does anyone know how to use an ArrayCollection that just has one
element; I keep getting a popup error saying "property or method of
a null object reference". The ArrayCollection needs to work whether
it has one element or multiple elements. Here's my code, what am I
doing wrong???
private var myArrayCollection:ArrayCollection;
private function myFunc(event:ResultEvent):void
{
if(event.result.blah.blah is ArrayCollection){ //if array has
multiple elements
myArrayCollection = event.result.blah.blah;
}else{ //if array has just one element
var tempAC:ArrayCollection = new ArrayCollection();
tempAC.addItem(event.result.blah.blah);
}
myArrayCollection = tempAC;
}
Thanks in advance,
Kyle
-------------------------------------------------------------
To unsubscribe from this list, simply email the list with
unsubscribe in the subject line
For more info, see http://www.affug.com
Archive @ http://www.mail-archive.com/discussion%40affug.com/
List hosted by FusionLink
-------------------------------------------------------------
-------------------------------------------------------------
To unsubscribe from this list, simply email the list with unsubscribe in the
subject line
For more info, see http://www.affug.com
Archive @ http://www.mail-archive.com/discussion%40affug.com/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------