royale-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject [royale-asjs] branch feature/MXRoyale updated: Image and CheckBox now compile.
Date Mon, 12 Mar 2018 19:17:32 GMT
This is an automated email from the ASF dual-hosted git repository.

pent pushed a commit to branch feature/MXRoyale
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git


The following commit(s) were added to refs/heads/feature/MXRoyale by this push:
     new 58f2f0b  Image and CheckBox now compile.
58f2f0b is described below

commit 58f2f0be67c4a843cea75b2001531dad580c4dbc
Author: Peter Ent <pent@apache.org>
AuthorDate: Mon Mar 12 15:17:28 2018 -0400

    Image and CheckBox now compile.
---
 .../src/main/royale/mx/controls/CheckBox.as        |  8 +--
 .../MXRoyale/src/main/royale/mx/controls/Image.as  | 67 +++++++++++-----------
 2 files changed, 39 insertions(+), 36 deletions(-)

diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/CheckBox.as b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/CheckBox.as
index e5a0b49..600ddbe 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/CheckBox.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/CheckBox.as
@@ -161,7 +161,7 @@ public class CheckBox extends Button implements IStrand, ISelectable
 	 *  @playerversion AIR 2.6
 	 *  @productversion Royale 0.0
 	 */
-	public function get selected():Boolean
+	override public function get selected():Boolean
 	{
 		return IToggleButtonModel(model).selected;
 	}
@@ -169,7 +169,7 @@ public class CheckBox extends Button implements IStrand, ISelectable
 	/**
 	 *  @private
 	 */
-	public function set selected(value:Boolean):void
+	override public function set selected(value:Boolean):void
 	{
 		IToggleButtonModel(model).selected = value;
 	}
@@ -220,12 +220,12 @@ public class CheckBox extends Button implements IStrand, ISelectable
 	}
 
 	[Bindable("change")]
-	public function get selected():Boolean
+	override public function get selected():Boolean
 	{
 		return (_icon.element as HTMLInputElement).checked;
 	}
 
-	public function set selected(value:Boolean):void
+	override public function set selected(value:Boolean):void
 	{
 	   (_icon.element as HTMLInputElement).checked = value;
 	}
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/Image.as b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/Image.as
index 5b631a5..21ff753 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/Image.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/Image.as
@@ -25,8 +25,11 @@ COMPILE::JS
 }
 import org.apache.royale.core.IImage;
 import org.apache.royale.core.IImageModel;
-import org.apache.royale.core.WrappedHTMLElement;
-import org.apache.royale.html.util.addElementToWrapper;
+COMPILE::JS {
+	import org.apache.royale.core.WrappedHTMLElement;
+	import org.apache.royale.html.util.addElementToWrapper;
+}
+import mx.core.UIComponent;
 /*
 import flash.display.DisplayObject;
 import flash.events.Event;
@@ -35,7 +38,9 @@ import mx.controls.listClasses.IDropInListItemRenderer;
 import mx.controls.listClasses.IListItemRenderer;
 import mx.core.IDataRenderer;
 import mx.core.mx_internal;
+*/
 import mx.events.FlexEvent;
+/*
 
 use namespace mx_internal;
 */
@@ -170,9 +175,9 @@ public class Image extends UIComponent
         super();
 
         // images are generally not interactive
-        tabChildren = false;
-        tabEnabled = true;
-        tabFocusEnabled = true;
+        //tabChildren = false;
+        //tabEnabled = true;
+        //tabFocusEnabled = true;
     }
 
     //--------------------------------------------------------------------------
@@ -207,36 +212,46 @@ public class Image extends UIComponent
 	{
 		return (model as IImageModel).url;
 	}
+	
+	//----------------------------------
+	//  src
+	//----------------------------------
+	
+	public function set src(value:String):void
+	{
+		(model as IImageModel).url = value;
+	}
+	
+	public function get src():String
+	{
+		return (model as IImageModel).url;
+	}
 
     //--------------------------------------------------------------------------
     //
     //  Properties
     //
     //--------------------------------------------------------------------------
-
-
-
-    //--------------------------------------------------------------------------
-    //
-    //  Inherited methods: UIComponent
-    //
-    //--------------------------------------------------------------------------
-
-
-
+	
 	COMPILE::JS
 	public function get imageElement():Element
 	{
-		return null;
-		// override this
+		return element;
 	}
-
+	
 	COMPILE::JS
 	public function applyImageData(binaryDataAsString:String):void
 	{
-		// override this
+		(element as HTMLImageElement).src = binaryDataAsString;
 	}
 
+
+    //--------------------------------------------------------------------------
+    //
+    //  Inherited methods: UIComponent
+    //
+    //--------------------------------------------------------------------------
+
 	/**
 	 * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
 	 */
@@ -248,18 +263,6 @@ public class Image extends UIComponent
 		return element;
 	}
 
-	COMPILE::JS
-	override public function get imageElement():Element
-	{
-		return element;
-	}
-
-	COMPILE::JS
-	override public function applyImageData(binaryDataAsString:String):void
-	{
-		(element as HTMLImageElement).src = binaryDataAsString;
-	}
-
 
 }
 

-- 
To stop receiving notification emails like this one, please contact
pent@apache.org.

Mime
View raw message