AS
[Bindable]
var object:Object = {
property: "Property"
};
MXML
<s:Label text="{object.property}"/>
The labels text will be “Property”, but if object.property is changed, the label isn’t updated. Is there any way around this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Properties of an object or collection will not dispatch a property change event unless implemented.
Likewise to your example, a change to an Array element will not be bound.
Collections such as ArrayCollection wrap objects within a proxy to dispatch events for binding.
Use an
ObjectProxyto dispatch changes to your object.Instantiate an ObjectProxy and listen for PropertyChangeEvent:
Access your object via the proxy, such as setting a property named ‘property’:
This example creates an ObjectProxy with a timer to change the ‘property’ member every second: