Browse Source

fixed IEventDispatcher (Dynamic->Void was causing some trouble with inheritance)

Nicolas Cannasse 17 years ago
parent
commit
cdfc39e030

+ 1 - 0
doc/CHANGES.txt

@@ -23,6 +23,7 @@ TODO inlining : substitute class+function type parameters in order to have fully
 	fixed haxe.io float/double in Neko (when bigEndian was null)
 	fixed haxe.io float/double in Neko (when bigEndian was null)
 	added __FSCommand2__ support
 	added __FSCommand2__ support
 	optimized haxe.Unserializer (use faster buffer access)
 	optimized haxe.Unserializer (use faster buffer access)
+	use "Dynamic" instead of Dynamic->Void for flash9 IEventDispatcher
 
 
 2008-07-28: 2.0
 2008-07-28: 2.0
 	fixed current package bug in inherited constructor type
 	fixed current package bug in inherited constructor type

+ 2 - 2
std/flash9/events/EventDispatcher.hx

@@ -2,10 +2,10 @@ package flash.events;
 
 
 extern class EventDispatcher implements IEventDispatcher {
 extern class EventDispatcher implements IEventDispatcher {
 	function new(?target : flash.events.IEventDispatcher) : Void;
 	function new(?target : flash.events.IEventDispatcher) : Void;
-	function addEventListener(type : String, listener : Dynamic -> Void, ?useCapture : Bool, ?priority : Int, ?useWeakReference : Bool) : Void;
+	function addEventListener(type : String, listener : Dynamic, ?useCapture : Bool, ?priority : Int, ?useWeakReference : Bool) : Void;
 	function dispatchEvent(event : Event) : Bool;
 	function dispatchEvent(event : Event) : Bool;
 	function hasEventListener(type : String) : Bool;
 	function hasEventListener(type : String) : Bool;
-	function removeEventListener(type : String, listener : Dynamic -> Void, ?useCapture : Bool) : Void;
+	function removeEventListener(type : String, listener : Dynamic, ?useCapture : Bool) : Void;
 	function toString() : String;
 	function toString() : String;
 	function willTrigger(type : String) : Bool;
 	function willTrigger(type : String) : Bool;
 }
 }

+ 2 - 2
std/flash9/events/IEventDispatcher.hx

@@ -1,9 +1,9 @@
 package flash.events;
 package flash.events;
 
 
 extern interface IEventDispatcher {
 extern interface IEventDispatcher {
-	function addEventListener(type : String, listener : Dynamic -> Void, ?useCapture : Bool, ?priority : Int, ?useWeakReference : Bool) : Void;
+	function addEventListener(type : String, listener : Dynamic, ?useCapture : Bool, ?priority : Int, ?useWeakReference : Bool) : Void;
 	function dispatchEvent(event : Event) : Bool;
 	function dispatchEvent(event : Event) : Bool;
 	function hasEventListener(type : String) : Bool;
 	function hasEventListener(type : String) : Bool;
-	function removeEventListener(type : String, listener : Dynamic -> Void, ?useCapture : Bool) : Void;
+	function removeEventListener(type : String, listener : Dynamic, ?useCapture : Bool) : Void;
 	function willTrigger(type : String) : Bool;
 	function willTrigger(type : String) : Bool;
 }
 }