You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@royale.apache.org by GitBox <gi...@apache.org> on 2018/11/26 17:11:55 UTC

[GitHub] aharui commented on a change in pull request #349: Added status variable and getter for JS compiler.

aharui commented on a change in pull request #349: Added status variable and getter for JS compiler.
URL: https://github.com/apache/royale-asjs/pull/349#discussion_r236345167
 
 

 ##########
 File path: frameworks/projects/MXRoyale/src/main/royale/mx/events/HTTPStatusEvent.as
 ##########
 @@ -19,91 +19,95 @@
 
 package mx.events
 {
-COMPILE::SWF
-{
-import flash.events.HTTPStatusEvent;        
-}
-/* import mx.events.Event;*/
-import org.apache.royale.events.Event;
-import org.apache.royale.events.IRoyaleEvent;
-
-/**
- *
- *  
- *  @langversion 3.0
- *  @playerversion Flash 9
- *  @playerversion AIR 1.1
- *  @productversion Royale 0.9.3
- *  @royalesuppresspublicvarwarning
- */
-COMPILE::SWF
-public class HTTPStatusEvent extends flash.events.HTTPStatusEvent
-{
-	public static const HTTP_STATUS:String = "httpStatus";
+	COMPILE::SWF
+		{
+			import flash.events.HTTPStatusEvent;        
+		}
+		/* import mx.events.Event;*/
+		import org.apache.royale.events.Event;
+	import org.apache.royale.events.IRoyaleEvent;
 	
-	public function HTTPStatusEvent(type:String, bubbles:Boolean = false, 
-	 cancelable:Boolean = false, status:int = 0)
+	/**
+	 *
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Royale 0.9.3
+	 *  @royalesuppresspublicvarwarning
+	 */
+	COMPILE::SWF
+	public class HTTPStatusEvent extends flash.events.HTTPStatusEvent
 	{
-		super(type, bubbles, cancelable,status);
+		public static const HTTP_STATUS:String = "httpStatus";
+		
+		public function HTTPStatusEvent(type:String, bubbles:Boolean = false, 
+										cancelable:Boolean = false, status:int = 0)
+		{
+			super(type, bubbles, cancelable,status);
+		}
+		
 	}
-}
-
-/**
- *  Represents event objects that are dispatched when focus changes.
- *
- *  @see mx.core.UIComponent
- *  
- *  @langversion 3.0
- *  @playerversion Flash 9
- *  @playerversion AIR 1.1
- *  @productversion Royale 0.9.3
- *  @royalesuppresspublicvarwarning
- */
-COMPILE::JS
-public class HTTPStatusEvent extends org.apache.royale.events.Event
-{
-   /*  include "../core/Version.as"; */
-	public static const HTTP_STATUS:String = "httpStatus";
-	
-	//--------------------------------------------------------------------------
-	//
-	//  Class constants
-	//
-	//--------------------------------------------------------------------------
-
 	
-	//--------------------------------------------------------------------------
-	//
-	//  Constructor
-	//
-	//--------------------------------------------------------------------------
-
 	/**
-	 *  Constructor.
-	 *
-	 *  @param type The event type; indicates the action that caused the event.
-	 *
-	 *  @param bubbles Specifies whether the event can bubble
-	 *  up the display list hierarchy.
+	 *  Represents event objects that are dispatched when focus changes.
 	 *
-	 *  @param cancelable Specifies whether the behavior
-	 *  associated with the event can be prevented.
+	 *  @see mx.core.UIComponent
 	 *  
 	 *  @langversion 3.0
 	 *  @playerversion Flash 9
 	 *  @playerversion AIR 1.1
 	 *  @productversion Royale 0.9.3
+	 *  @royalesuppresspublicvarwarning
 	 */
-	public function HTTPStatusEvent(type:String, bubbles:Boolean = false,
-	cancelable:Boolean = false, status:int = 0)
+	COMPILE::JS
+	public class HTTPStatusEvent extends org.apache.royale.events.Event
 	{
-		super(type, bubbles, cancelable);
+		/*  include "../core/Version.as"; */
+		public static const HTTP_STATUS:String = "httpStatus";
+		private var m_status:int;
+		
+		//--------------------------------------------------------------------------
+		//
+		//  Class constants
+		//
+		//--------------------------------------------------------------------------
+		
+		
+		//--------------------------------------------------------------------------
+		//
+		//  Constructor
+		//
+		//--------------------------------------------------------------------------
+		
+		/**
+		 *  Constructor.
+		 *
+		 *  @param type The event type; indicates the action that caused the event.
+		 *
+		 *  @param bubbles Specifies whether the event can bubble
+		 *  up the display list hierarchy.
+		 *
+		 *  @param cancelable Specifies whether the behavior
+		 *  associated with the event can be prevented.
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Royale 0.9.3
+		 */
+		public function HTTPStatusEvent(type:String, bubbles:Boolean = false,
+										cancelable:Boolean = false, status:int = 0)
+		{
+			super(type, bubbles, cancelable);
+			this.m_status = status;
 
 Review comment:
   I don't think you need 'this.'
   
   There should be very few occurrences of 'this' in the AS source.  I think should only be needed when referencing member APIs that have the same name as local and parameter variables.

----------------------------------------------------------------
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