Skip to content

Instantly share code, notes, and snippets.

@sophistifunk
Created February 15, 2016 20:50
Show Gist options
  • Save sophistifunk/216abbc1797dbfd5b06c to your computer and use it in GitHub Desktop.
Save sophistifunk/216abbc1797dbfd5b06c to your computer and use it in GitHub Desktop.
// All you needed to do if you wanted codegen:
[Bindable]
public var easyProp:MyClass;
// More explicit version using a named event:
private var _myProp:MyClass;
[Bindable("myPropChange")]
public function get myProp():MyClass
{
return _myProp;
}
public function set myProp(value:MyClass):void
{
if (_myProp == value) return;
_myProp = value;
dispatchEvent(new Event("myPropChange"));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment