2 Replies Latest reply on Jun 9, 2010 7:44 AM by pdvel

    Data binding with my object




      I'm trying to keep my settings neatly separated from the rest of my application, in a Settings class. (in a separate .as file)

      I want to use some of these settings in my MXML, e.g. <mx:Button Label="{settings.buttonText}"/>

      To accomplish this I have created getter and setter functions in my Settings class, and made the whole class [Bindable].

      In the <mx:script> section of my MXML file, I have a var settings:Settings = new Settings(); and UI elements like the button example above.

      I still get the error that in my MXML  "Data binding will not be able to detect assignments to 'settings'."

      Does anybody know how I can fix this, to achieve what I'm after?


      Thanks in advance for any pointers you might have,

      Peter Vel