royale-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] aharui closed pull request #342: Switching from using a new HTTPStatusEvent to a ValueEvent, now with …
Date Wed, 14 Nov 2018 23:20:50 GMT
aharui closed pull request #342: Switching from using a new HTTPStatusEvent to a ValueEvent,
now with …
URL: https://github.com/apache/royale-asjs/pull/342
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/frameworks/projects/Core/src/main/royale/org/apache/royale/events/ValueEvent.as
b/frameworks/projects/Core/src/main/royale/org/apache/royale/events/ValueEvent.as
index 8bf18ffcf..f5ddf11c2 100644
--- a/frameworks/projects/Core/src/main/royale/org/apache/royale/events/ValueEvent.as
+++ b/frameworks/projects/Core/src/main/royale/org/apache/royale/events/ValueEvent.as
@@ -40,7 +40,7 @@ package org.apache.royale.events
          *  @playerversion AIR 2.6
          *  @productversion Royale 0.0
          */
-		public function ValueEvent(type:String, value:Object = null, bubbles:Boolean=false,
+		public function ValueEvent(type:String, value:* = null, bubbles:Boolean=false,
                                     cancelable:Boolean=false)
 		{
 			super(type, bubbles, cancelable);
@@ -56,7 +56,7 @@ package org.apache.royale.events
          *  @playerversion AIR 2.6
          *  @productversion Royale 0.0
          */
-		public var value:Object;
+		public var value:*;
 
 		/**
 		 * Create a copy/clone of the ValueEvent object.
diff --git a/frameworks/projects/Network/src/main/royale/NetworkClasses.as b/frameworks/projects/Network/src/main/royale/NetworkClasses.as
index b905d8825..902c70e49 100644
--- a/frameworks/projects/Network/src/main/royale/NetworkClasses.as
+++ b/frameworks/projects/Network/src/main/royale/NetworkClasses.as
@@ -32,10 +32,6 @@ package
         import org.apache.royale.net.URLBinaryUploader; URLBinaryUploader;
         import org.apache.royale.net.events.ResultEvent; ResultEvent;
         import org.apache.royale.net.events.FaultEvent; FaultEvent;
-        COMPILE::JS
-        {
-            import org.apache.royale.net.events.HTTPStatusEvent; HTTPStatusEvent;
-        }
         
         import org.apache.royale.net.remoting.messages.AcknowledgeMessage; AcknowledgeMessage;
         import org.apache.royale.net.remoting.messages.AcknowledgeMessageExt;
diff --git a/frameworks/projects/Network/src/main/royale/org/apache/royale/net/URLLoader.as
b/frameworks/projects/Network/src/main/royale/org/apache/royale/net/URLLoader.as
index b3a2faab1..bb8cbe857 100644
--- a/frameworks/projects/Network/src/main/royale/org/apache/royale/net/URLLoader.as
+++ b/frameworks/projects/Network/src/main/royale/org/apache/royale/net/URLLoader.as
@@ -29,7 +29,7 @@ package org.apache.royale.net
     }
     COMPILE::JS
     {
-        import org.apache.royale.net.events.HTTPStatusEvent;
+        import org.apache.royale.events.ValueEvent;
     }
     
     import org.apache.royale.events.DetailEvent;
@@ -270,7 +270,7 @@ package org.apache.royale.net
             var element:XMLHttpRequest = this.element as XMLHttpRequest;
             if (element.readyState == 2) {
                 dispatchEvent(HTTPConstants.RESPONSE_STATUS);
-                dispatchEvent( new HTTPStatusEvent(element.status) );
+                dispatchEvent( new ValueEvent(HTTPConstants.STATUS, element.status) );
             } else if (element.readyState == 4) {
                 if (element.status >= 400) // client error or server error
                 {
diff --git a/frameworks/projects/Network/src/main/royale/org/apache/royale/net/events/HTTPStatusEvent.as
b/frameworks/projects/Network/src/main/royale/org/apache/royale/net/events/HTTPStatusEvent.as
deleted file mode 100644
index ff6d62b91..000000000
--- a/frameworks/projects/Network/src/main/royale/org/apache/royale/net/events/HTTPStatusEvent.as
+++ /dev/null
@@ -1,39 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You under the Apache License, Version 2.0
-//  (the "License"); you may not use this file except in compliance with
-//  the License.  You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS,
-//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//  See the License for the specific language governing permissions and
-//  limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.royale.net.events
-{
-	import org.apache.royale.events.Event;
-    import org.apache.royale.net.URLLoader;
-	
-    /**
-     *  HTTPStatusEvent is dispatched from a URLLoader
-     *  when it receives readyState = 2 with an HTTP
-     *  status code.
-     */
-	public class HTTPStatusEvent extends Event
-	{
-		public static const HTTP_STATUS:String = "httpStatus";
-		public var status:uint;
-		public function HTTPStatusEvent(statusCode:uint, bubbles:Boolean = false, cancelable:Boolean
= true)
-		{
-			super(HTTP_STATUS, bubbles, cancelable);
-			status = statusCode;
-		}
-	}
-}


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message