Try this:

var val:PfVO;

function initPF()
{
vopf=new Array();
pf = new PfVO();
pf.stagione.cdc_stag="2005";
vopf.push(pf);
val = vopf[0];


}


<mx:Binding source="{PfVO(val ).stagione.cdc_stag==undefined 
?'NK':PfVO(val).stagione.cdc_stag}" destination="lstag.text" /> 


I don't know much about Binding, but can we watch a[0] kind of thing? Don't
know :(

I have created a sample file to test this approach, it works..You can find a
way by doing something like that...



###BindingTest.mxml###

<?xml version="1.0" encoding="iso-8859-1"?>
<mx:Application width="800" height="600"
xmlns:mx="http://www.macromedia.com/2003/mxml"; xmlns="*"
initialize="appInit()">

<mx:Script>
<![CDATA[

var arr:Array;
var val:TestVO;


function appInit() {
arr = [];
var tvo = new TestVO();
tvo.name = "Abdul";
arr.push(tvo);
val = arr[0];

}

]]>
</mx:Script>



<mx:Binding source="{TestVO(val).name== undefined ? 'No
Name':TestVO(val).name}" destination="_ti.text" /> 
<mx:TextInput id="_ti"/>


</mx:Application>


##TestVO.as##

class TestVO
{

public var name:String;
}






-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 15, 2005 10:17 PM
To: Flex Coders
Subject: [flexcoders] Help Array


Hi can you help to correct this problem

function initPF()
{
vopf=new Array();
pf = new PfVO();
pf.stagione.cdc_stag="2005";
vopf.push(pf);
}



<mx:Binding source="{PfVO(vopf[0]).stagione.cdc_stag==undefined 
?'NK':PfVO(vopf[0]).stagione.cdc_stag}" destination="lstag.text" /> 

But display always NK???

but if i use
<mx:Binding source="{pf.stagione.cdc_stag==undefined 
?'NK':PfVO(pf.stagione.cdc_stag}" destination="lstag.text" /> work fine

Can you help me please.
Devis









Yahoo! Groups Links









Reply via email to