Today I experienced a problem with databinding and the code behind design.
I connected the enabled property of an TextInput with the text property of another TextInput.
<mx: TextInput id="textInput2" ...
enabled="{textInput1.text != ''}" />
This worked out pretty well until I tried to set the text property by code and not by keyboard. I didn’t really know why but I assumed that my code behind sourcefile (base class of the mxml file) could be “irritating” flex.
After some googling I found a site (I really don’t know where it was) which gave me the solution to this issue:
[Bindable]
Having [Bindable] set on the code behind class everything startet working again!
Advertisement