I am guessin that you are just free floating the arrFilenames. push("abc" ); It 
needs to be in a function  or am i missing something?
<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml"; 
layout="vertical" xmlns:flexlib="flexlib.*" 
xmlns:controls="flexlib.controls.*" 
xmlns:tabBarClasses="flexlib.controls.tabBarClasses.*" 
creationComplete="initApp()">
<mx:Style source="styles.css"/>
<mx:Script>
<![CDATA[
import mx.containers.Panel;
import mx.collections.ArrayCollection;
[Bindable]
private var myArrayCollection:ArrayCollection = new 
ArrayCollection([{label:'Adobe'},{label:'Air'},{label:'Flex'}]);
public var fileNames1:Array = new Array();
/**
* I get Access Of Undefined here
*/
fileNames1.push("Adobe");
private function initApp():void{
//works here
fileNames1.push("Adobe");
}
]]>
</mx:Script>
<controls:AdvancedTabBar dataProvider="{myArrayCollection}" labelField="label"/>
</mx:WindowedApplication>



----- Original Message ----
From: Mark Shen <[EMAIL PROTECTED]>
To: [email protected]
Sent: Wednesday, February 6, 2008 3:03:55 PM
Subject: Re: [flexcoders] Array function error?

I update the code
   
  public var arrFilenames: Array = new Array();
   arrFilenames. push("abc" );
 
but I get same error message.
 
"Access of undefined property arrFilenames. "
 
Thanks


----- Original Message ----
From: Sherif Abdou <[EMAIL PROTECTED] com>
To: [EMAIL PROTECTED] ups.com
Sent: Wednesday, February 6, 2008 3:51:11 PM
Subject: Re: [flexcoders] Array function error?


why do u have "" in the array?
public var fileNames1:Array = [];
or just public var fileNames1:Array = new Array();


----- Original Message ----
From: markflex2007 <markflex2007@ yahoo.com>
To: [EMAIL PROTECTED] ups.com
Sent: Wednesday, February 6, 2008 2:47:47 PM
Subject: [flexcoders] Array function error?


Hi,

I did a simple code

public var filenames1:Array = new Array(""); 
filenames1.push( "abc");

but I get a error 

"Access of undefined property filenames1."

I do not know what is wrong. Please give me a idea to fix it.

Thanks

Mark







Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. 





Never miss a thing. Make Yahoo your homepage. 



      
____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 

Reply via email to