Hmmm in your example, the Binding Example (https://gist.github.com/2029110), when I trace the ticker value, it differs from the display.
I change the Ticker class to this
class Ticker implements Cls {
@:bindable var tick:Int = 0;
public function new(tickRate:Int) {
var t = new Timer(Std.int(1000 / tickRate));
t.run = function () // I change this
{
tick++;
trace(tick); // I trace from this
}
}
}
when it traces 3, the display show 2, somehow it is late...
I have tried it before, it display the incorrect thing...
I think when we use manually fire the signaller, it produces correct thing
Thanks for reporting. There was a bug in the setter generation for plain variables, that cause the signaller to fire before the actual field got updated.
Hmmm in your example, the Binding Example (https://gist.github.com/2029110), when I trace the ticker value, it differs from the display. I change the Ticker class to this
class Ticker implements Cls { @:bindable var tick:Int = 0; public function new(tickRate:Int) { var t = new Timer(Std.int(1000 / tickRate)); t.run = function () // I change this { tick++; trace(tick); // I trace from this } } }
when it traces 3, the display show 2, somehow it is late... I have tried it before, it display the incorrect thing... I think when we use manually fire the signaller, it produces correct thing