Skip to content

Instantly share code, notes, and snippets.

@bsideup
Created June 3, 2013 14:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bsideup/5698584 to your computer and use it in GitHub Desktop.
Save bsideup/5698584 to your computer and use it in GitHub Desktop.
test
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