back2dos / tinkerbell

MIT License
83 stars 8 forks source link

tink_reactive not so reactive #7

Closed alijaya closed 12 years ago

alijaya commented 12 years ago

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

back2dos commented 12 years ago

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.