If I run this application the TextInput will show the text
"FOO" as expected. But when I change this text and hit the Button
(which calls the doSomething() method) the text in the AlertBox is
still "FOO". I expect the text would reflect my change in the text
So why does the binding only works in the read direction and
changes to the text input are not reflected in the account object?
I tought that this would work, but mayby I missed something.
Binding works one way. This means that textInput.text changes
to match the value of account.identifier, not the other way around.
While I think it's theoretically possible to create a binding the
other way (I haven't played with binding in ActionScript), it makes
more sense to listen to the TextInput's change event to get changes
to the text field.
Or, you can create a model in the MXML and bind one its
properties to the textinput's value. Look in the docs about the
mx:Model tag for details.