I having trouble binding to elements in xml.
Flex 4.6 setup. Just a simple singleton with user credential info.

[Bindable]
public class BaseModel    { 
     public var userCred:XML= new XML();

    public static function getInstance() : BaseModel {
        if ( baseModel == null )
            baseModel = new BaseModel();
        return baseModel;
    }
}

Code from welcome window.
[Bindable] private var model:BaseModel=BaseModel.getInstance();
<j:Label id="fullName" percentWidth="100" text="{model.userCred.lastName + ', ' 
+ model.userCred.firstName}"/>

I get this error:
Warning: Data binding will not be able to detect assignments to 'lastName'. 
                  text="{model.userCred.lastName.toString() + ', ' + 
model.userCred.firstName.toString()}"/>

I’m using bead
<j:beads>
        <js:ContainerDataBinding/>
</j:beads>    

I also tried this but got the same error. 
    <fx:Binding
        source="model.userCred.lastName"
        destination="fullName.text"/>

Thanks

Reply via email to