Flex + CheckBox + Dataprovider... quite possibly the easiest question you will answer today -


It may be that I did not get enough sleep last night but I am facing a strange Flex 3.4 issue.

Scenario:

I have a class that provides a dataprider in my whole application, called "Dataprover.As":

  package {Public class DataProvider {[bindable] Public Static Ver email_enable: Boolean = true; }}  

In an mxml form, "settings.mxml" I have a checkbox control which is bound to the email_enable variable of my Dataprover class:

  & Lt; Mx: check box x = "452" y = "170" label = "{Language.loadLanguageResource ('lblEmail')}" id = "chkEmail" selected = "{DataProvider.email_enable}" change = "on change ()" />  

All prices are getting well, if I set the variable to correct or incorrect my DATAPRad, the checkbox indicates this change; However, if I click on the checkbox and change its value, then the datacenter variable never reflects the change

I am peering my head against the wall And it can not work. I have not taken any advantage of my heart. Please save me.

This is the reason that Flex has a one-way band of at least 3.x; Flex 4 will support 2-way binding.

You need to add an event listener to the checkbox and modify the variable from the listener.

PS: You are right, this is actually the easiest question I answered today;)


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -