[dispatcher] rename signal vars
This commit is contained in:
@@ -43,15 +43,15 @@ class Demo extends App implements DemoListener {
|
||||
|
||||
var dispatcher = new DemoDispatcher();
|
||||
dispatcher.connect(app);
|
||||
dispatcher.test1Change.emit();
|
||||
dispatcher.test2Change.emit(1);
|
||||
dispatcher.test3Change.emit(1, "test");
|
||||
dispatcher.test4Change.emit(app);
|
||||
dispatcher.test1Signal.emit();
|
||||
dispatcher.test2Signal.emit(1);
|
||||
dispatcher.test3Signal.emit(1, "test");
|
||||
dispatcher.test4Signal.emit(app);
|
||||
dispatcher.disconnect(app);
|
||||
dispatcher.test1Change.emit();
|
||||
dispatcher.test2Change.emit(1);
|
||||
dispatcher.test3Change.emit(1, "test");
|
||||
dispatcher.test4Change.emit(app);
|
||||
dispatcher.test1Signal.emit();
|
||||
dispatcher.test2Signal.emit(1);
|
||||
dispatcher.test3Signal.emit(1, "test");
|
||||
dispatcher.test4Signal.emit(app);
|
||||
|
||||
new JsonLoader().GET("http://umix.tv/channel/data2/renova.json")
|
||||
.then(function(data:Array<Model>) {
|
||||
@@ -61,19 +61,19 @@ class Demo extends App implements DemoListener {
|
||||
.catchError(function(error) trace(error));
|
||||
}
|
||||
|
||||
public function test1():Void {
|
||||
public function onTest1():Void {
|
||||
trace('test1');
|
||||
}
|
||||
|
||||
public function test2(a:Int):Void {
|
||||
public function onTest2(a:Int):Void {
|
||||
trace('test2', a);
|
||||
}
|
||||
|
||||
public function test3(a:Int, b:String):Void {
|
||||
public function onTest3(a:Int, b:String):Void {
|
||||
trace('test3', a, b);
|
||||
}
|
||||
|
||||
public function test4(app: App):Void {
|
||||
public function onTest4(app: App):Void {
|
||||
trace('test4', app);
|
||||
}
|
||||
|
||||
|
||||
@@ -3,12 +3,12 @@ package demo.dispatch;
|
||||
import haxework.App;
|
||||
|
||||
interface DemoListener {
|
||||
public function test1():Void;
|
||||
public function test2(a:Int):Void;
|
||||
public function test3(a:Int, b:String):Void;
|
||||
public function test4(app:App):Void;
|
||||
public function onTest1():Void;
|
||||
public function onTest2(a:Int):Void;
|
||||
public function onTest3(a:Int, b:String):Void;
|
||||
public function onTest4(app:App):Void;
|
||||
}
|
||||
|
||||
@:dispatcher(DemoListener) class DemoDispatcher {
|
||||
@:yield @:dispatcher(DemoListener) class DemoDispatcher {
|
||||
public function new() {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user