When you use the mx.core.Application.application reference, the compiler loses the data type information it needs to correctly set up the listeners that binding uses.  Such bindings typically work once, but then do not update the controls when changes occur.

 

If you want to bind in components to things at the Application level, you can either pass in a reference the thing you want to bind to, or you can pass in a typed reference to the application itself.  The type is the file name of the application.

 

In the component

public var app:MyAppFileName;  //because the generator/compiler makes a class named the file name

 

Then pass in {this} in the data object parameter. (haven’t actually tried this with a pop-up)

 

You should be able to reliably bind: text=”{app.myCheckBox.selected}”

 

Tracy

 


From: [email protected] [mailto:[email protected]] On Behalf Of Samuel Vaz
Sent: Sunday, July 03, 2005 4:53 PM
To: [email protected]
Subject: RES: [flexcoders] Binding to Model in Application

 

Maybe you are binding with property that will not change when a determinate event occurs.

 

 

 


De: [email protected] [mailto:[email protected]] Em nome de JesterXL
Enviada em: domingo, 3 de julho de 2005 14:54
Para: Flexcoders
Assunto: [flexcoders] Binding to Model in Application

 

I'm binding some CheckBox's to a Model in my Application.  The CheckBox'
reside in a PopUp.  They reference the original model like so:

mx.core.Application.application.myModel.someProperty.

It works great, but I'm getting warnings saying that changes to all of my
"unknown" properties won't trigger a change.  Is this the compiler just
getting confused?

--JesterXL




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




YAHOO! GROUPS LINKS




Reply via email to