We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d776100 commit 6d5e23cCopy full SHA for 6d5e23c
std/haxe/EventLoop.hx
@@ -40,7 +40,7 @@ class Event {
40
}
41
42
/**
43
- Stop this event from repeating.
+ Start the event with the given callback function.
44
**/
45
public function start( callb : Void -> Void ) {
46
this.callb = callb;
@@ -203,8 +203,8 @@ class EventLoop {
203
Add a function to be run once at next loop of the event loop.
204
205
public function run( callb : Void -> Void, priority = 0 ) : Event {
206
- var e : Event = null;
207
- e = add(function() { e.stop(); callb(); }, priority);
+ var e : Event = new Event(this,priority);
+ e.start(function() { e.stop(); callb(); });
208
return e;
209
210
0 commit comments