Răsfoiți Sursa

Merge pull request #2541 from SmilyOrg/development

added describeType to flash Lib + Http onError retry fix
Nicolas Cannasse 10 ani în urmă
părinte
comite
bcef8f3875
2 a modificat fișierele cu 7 adăugiri și 1 ștergeri
  1. 4 0
      std/flash/Lib.hx
  2. 3 1
      std/haxe/Http.hx

+ 4 - 0
std/flash/Lib.hx

@@ -64,6 +64,10 @@ class Lib {
 	public static function trace( arg : Dynamic ) {
 		untyped __global__["trace"](arg);
 	}
+	
+	public static function describeType( value : Dynamic ) : flash.xml.XML {
+		return untyped __global__["flash.utils.describeType"](value);
+	}
 
 	public static function attach( name : String ) : flash.display.MovieClip {
 		var cl = untyped __as__(__global__["flash.utils.getDefinitionByName"](name),Class);

+ 3 - 1
std/haxe/Http.hx

@@ -380,7 +380,9 @@ class Http {
 			me.responseData = output.getBytes().toString();
 			#end
 			err = true;
-			old(e);
+			// Resetting back onError before calling it allows for a second "retry" request to be sent without onError being wrapped twice
+			onError = old;
+			onError(e);
 		}
 		customRequest(post,output);
 		if( !err )