Created
February 15, 2016 20:50
-
-
Save sophistifunk/216abbc1797dbfd5b06c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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