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 http://www.fusionlink.com

-------------------------------------------------------------

Reply via email to