This content has been marked as final. Show 5 replies
I would use a separate class to contain these values, but it will work the way you're doing this. For your variables you'll need to annotate them as bindable:
[Bindable] private var fName:String;
and then in your MXML, bind your textInput to the variable:
Now if you assign a new value to fName, it will be reflected in the textInput control.
This doesn't seem to work when the TextInput is in a Component. I get an error, "Access of undefined property fName".
This is a seperate MXML Component, outside of my main.mxml file.
Add public properties to your component, bind those properties to the TextInput. When you use the component in your Application, bind the values you have into the component's public properties.
I don't follow. My component should be public by default, or at least the items in it. Anything with an ID is supposed to be automatically public. Otherwise, how do I make the whole component public?