瀏覽代碼

onError late binding.

Nicolas Cannasse 19 年之前
父節點
當前提交
23641a9c40
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      std/haxe/remoting/SocketConnection.hx

+ 3 - 1
std/haxe/remoting/SocketConnection.hx

@@ -33,7 +33,9 @@ class SocketConnection extends AsyncConnection {
 
 	function __resolve(field) : AsyncConnection {
 		var s = new SocketConnection(__data,__path.copy());
-		s.onError = onError;
+		var me = this;
+		// late binding
+		s.onError = function(e) { me.onError(e); }
 		s.__funs = __funs;
 		#if neko
 		s.__r = __r;