Created
June 3, 2013 14:33
-
-
Save bsideup/5698584 to your computer and use it in GitHub Desktop.
test
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
class TestBindx extends TestCase implements IBindable | |
{ | |
public var def:Int; | |
@bindable public function toString():String { | |
return '$def!'; | |
} | |
public function testBasic() { | |
this.bindxGlobal(function (varName:String, old:Dynamic, val:Dynamic) { | |
trace('changed $varName : $old -> $val'); | |
}); | |
var methodListener = function (_, newValue:String) { trace("listener " + newValue); }; | |
this.toString.bindx(function (_, newValue) { trace(newValue); } ); | |
this.toString.bindx(methodListener); | |
this.def = 12; | |
this.def = 14; | |
assertTrue(true); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment