Skip to content


Binding in Flex with Getters and Setters

When building a component class and using the recommended method of providing access to properties with getter and setter functions you may find that you are unable to bind to these properties. It’s actually rather trivial to enable binding but perhaps not overly obvious. All you need to do is add [Bindable] before the getter function.

 private var _myVar:String;

 [Bindable] public function get myVar():String {   return this._myVar; } public function set myVar( value:String ):void {   this._myVar = value; }

Posted in Actionscript, Code.

Tagged with , .


0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.



Some HTML is OK

or, reply to this post via trackback.



close