[Solution] Code Behind: Databinding breaks

14 11 2008

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

Actions

Information

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s




Follow

Get every new post delivered to your Inbox.