I had forgotten I solved this myself last Dec. So basically from what I can tell the precompiler no longer does any [Bindable] conversions so you have to manually create the getters and setters for your model when this changes. I hope this helps anyone who may run into the same problem. There's literally no documentation on this any wheres.
i.e.
[Bindable]
public var username : String;
becomes
private var _username : String;
[Bindable(event="propertyChange")]
public function get username():String
{
return this._serviceState;
}
public function set username(value:String):void
{
var oldValue:Object = this._username;
if (oldValue !== value)
{
this._username = value;
if (this.hasEventListener("propertyChange"))
this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "username", oldValue, value));
}
}
You also need to make sure what ever class contains this property implements IEventDispatcher and has the following functions:
| // | IEventDispatcher implementation |
| // |
| private var _bindingEventDispatcher:flash.events.EventDispatcher = |
| | new flash.events.EventDispatcher(flash.events.IEventDispatcher(this)); |
| |
| /** |
| * @inheritDoc |
| */ |
| public function addEventListener(type:String, listener:Function, |
| | | | | | | | | useCapture:Boolean = false, |
| | | | | | | | | priority:int = 0, |
| | | | | | | | | weakRef:Boolean = false):void |
| { |
| | _bindingEventDispatcher.addEventListener(type, listener, useCapture, |
| | | priority, weakRef); |
| } |
| |
| /** |
| * @inheritDoc |
| */ |
| public function dispatchEvent(event:flash.events.Event):Boolean |
| { |
| | return _bindingEventDispatcher.dispatchEvent(event); |
| } |
| |
| /** |
| * @inheritDoc |
| */ |
| public function hasEventListener(type:String):Boolean |
| { |
| | return _bindingEventDispatcher.hasEventListener(type); |
| } |
| |
| /** |
| * @inheritDoc |
| */ |
| public function removeEventListener(type:String, |
| | | | | | | | | | listener:Function, |
| | | | | | | | | | useCapture:Boolean = false):void |
| { |
| | _bindingEventDispatcher.removeEventListener(type, listener, useCapture); |
| } |
| |
| /** |
| * @inheritDoc |
| */ |
| public function willTrigger(type:String):Boolean |
| { |
| | return _bindingEventDispatcher.willTrigger(type); |
| } |