flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject svn commit: r1395325 - /incubator/flex/sdk/branches/develop/mustella/as3/src/mustella/SendResultsToRunner.as
Date Sun, 07 Oct 2012 15:09:04 GMT
Author: aharui
Date: Sun Oct  7 15:09:04 2012
New Revision: 1395325

URL: http://svn.apache.org/viewvc?rev=1395325&view=rev
Log:
Revert last attempt

Modified:
    incubator/flex/sdk/branches/develop/mustella/as3/src/mustella/SendResultsToRunner.as

Modified: incubator/flex/sdk/branches/develop/mustella/as3/src/mustella/SendResultsToRunner.as
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/as3/src/mustella/SendResultsToRunner.as?rev=1395325&r1=1395324&r2=1395325&view=diff
==============================================================================
--- incubator/flex/sdk/branches/develop/mustella/as3/src/mustella/SendResultsToRunner.as (original)
+++ incubator/flex/sdk/branches/develop/mustella/as3/src/mustella/SendResultsToRunner.as Sun
Oct  7 15:09:04 2012
@@ -49,7 +49,7 @@ public class SendResultsToRunner 
 
 	public static var regExp5:RegExp = /%3D/g;
 
-	public static var u:URLLoader;
+
 
 	/**
   	 * the way out for the result data
@@ -128,19 +128,7 @@ public class SendResultsToRunner 
 		if (!noSend) { 
 			trace ("sending: " + baseURL + midURL + final + " at: " + new Date());
 			// var u:String= baseURL + midURL + final;
-			if (u == null)
-			{
-				u = new URLLoader();
-				u.addEventListener("complete", completeHandler);
-				u.addEventListener("complete", httpEvents);
-				u.addEventListener("ioError", httpEvents);
-				u.addEventListener("open", httpEvents);
-				u.addEventListener("progress", httpEvents);
-				u.addEventListener("httpStatus", httpEvents);
-				u.addEventListener("securityError", httpEvents);
-			}
-			UnitTester.pendingOutput++;
-			u.load (new URLRequest (baseURL + midURL + final));
+			var u:URLLoader = new URLLoader (new URLRequest (baseURL + midURL + final));
 
 			/*	
 			var sock:Socket = new Socket ("localhost",  UnitTester.runnerPort);
@@ -149,14 +137,28 @@ public class SendResultsToRunner 
 			sock.flush();
 			*/
 		
+			u.addEventListener("complete", completeHandler);
+			u.addEventListener("complete", httpEvents);
+			u.addEventListener("ioError", httpEvents);
+			u.addEventListener("open", httpEvents);
+			u.addEventListener("progress", httpEvents);
+			u.addEventListener("httpStatus", httpEvents);
+			u.addEventListener("securityError", httpEvents);
+			u.load (new URLRequest (baseURL + midURL + final));
+			UnitTester.pendingOutput++;
+			dict[u] = baseURL + midURL + final;
 		}
 
 		
 
 	}
 	
+	public static var dict:Dictionary = new Dictionary();
+
 	public static function completeHandler (e:Event):void  {
 		UnitTester.pendingOutput--;
+		//trace("received complete for", dict[e.target]);
+		delete dict[e.target];
 	}
 
 	public static function httpEvents (e:Event):void  {



Mime
View raw message