Is lastName bindable? Are you getting a similar warning in Flex?

From: Mark<mailto:m_hartn...@comcast.net>
Sent: Monday, March 7, 2022 8:31 PM
To: users@royale.apache.org<mailto:users@royale.apache.org>
Subject: Binding to xml

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