royale-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [royale-asjs] 05/05: more errors fixed now that SWF compile reports more errors
Date Mon, 10 Sep 2018 23:23:11 GMT
This is an automated email from the ASF dual-hosted git repository.

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

commit 7d5e10c1bf26531fec5589c52ff5dc22aadca265
Author: Alex Harui <aharui@apache.org>
AuthorDate: Mon Sep 10 16:17:46 2018 -0700

    more errors fixed now that SWF compile reports more errors
---
 .../tourdeflexmodules/src/mx/containers/SimpleControlBarExample.mxml | 2 +-
 .../mxroyale/tourdeflexmodules/src/mx/containers/TitleWindowApp.mxml | 5 +++--
 .../mxroyale/tourdeflexmodules/src/mx/controls/ButtonExample.mxml    | 4 ++--
 examples/mxroyale/tourdeflexmodules/src/mx/controls/SimpleAlert.mxml | 5 +++--
 examples/mxroyale/tourdeflexmodules/src/mx/controls/SimpleImage.mxml | 2 +-
 .../mxroyale/tourdeflexmodules/src/mx/controls/SpacerExample.mxml    | 4 ++--
 .../mxroyale/tourdeflexmodules/src/mx/effects/GlowEffectExample.mxml | 2 +-
 .../mxroyale/tourdeflexmodules/src/mx/effects/MoveEffectExample.mxml | 2 +-
 .../tourdeflexmodules/src/mx/effects/ParallelEffectExample.mxml      | 2 +-
 .../tourdeflexmodules/src/mx/effects/ResizeEffectExample.mxml        | 2 +-
 .../mxroyale/tourdeflexmodules/src/spark/controls/ButtonExample.mxml | 4 ++--
 .../tourdeflexmodules/src/spark/controls/TitleWindowExample.mxml     | 5 +++--
 .../src/spark/itemRenderers/ItemRenderer2Example.mxml                | 4 ++--
 13 files changed, 23 insertions(+), 20 deletions(-)

diff --git a/examples/mxroyale/tourdeflexmodules/src/mx/containers/SimpleControlBarExample.mxml
b/examples/mxroyale/tourdeflexmodules/src/mx/containers/SimpleControlBarExample.mxml
index 7340395..ea436d3 100755
--- a/examples/mxroyale/tourdeflexmodules/src/mx/containers/SimpleControlBarExample.mxml
+++ b/examples/mxroyale/tourdeflexmodules/src/mx/containers/SimpleControlBarExample.mxml
@@ -27,7 +27,7 @@
 
         <mx:HBox width="100%" height="100%">
             <!-- Area for your catalog. -->
-            <mx:Image source="@Embed(source='assets/ApacheFlexLogo.png')" width="50%"
height="100%"/>
+            <mx:Image source="assets/ApacheFlexLogo.png" width="50%" height="100%"/>
 			<mx:Text width="50%"
                 text="The ControlBar container in this example adds a Label, NumericStepper,
Spacer, and Button control to the bottom of the Panel container."/>
         </mx:HBox>
diff --git a/examples/mxroyale/tourdeflexmodules/src/mx/containers/TitleWindowApp.mxml b/examples/mxroyale/tourdeflexmodules/src/mx/containers/TitleWindowApp.mxml
index 6a02c1b..aa20598 100755
--- a/examples/mxroyale/tourdeflexmodules/src/mx/containers/TitleWindowApp.mxml
+++ b/examples/mxroyale/tourdeflexmodules/src/mx/containers/TitleWindowApp.mxml
@@ -26,7 +26,8 @@
        
             import mx.managers.PopUpManager;
             import mx.containers.TitleWindow;
-             import flash.geom.Point;
+             import org.apache.royale.geom.Point;
+            import org.apache.royale.utils.PointUtils;
 
             private var point1:Point = new Point();
       
@@ -41,7 +42,7 @@
                 // Position it 25 pixels down and to the right of the Button control.
                 point1.x=0;
                 point1.y=0;                
-                point1=myButton.localToGlobal(point1);
+                point1=PointUtils.localToGlobal(point1, myButton);
                 login.x=point1.x+25;
                 login.y=point1.y+25;
              
diff --git a/examples/mxroyale/tourdeflexmodules/src/mx/controls/ButtonExample.mxml b/examples/mxroyale/tourdeflexmodules/src/mx/controls/ButtonExample.mxml
index db26951..6a61f22 100755
--- a/examples/mxroyale/tourdeflexmodules/src/mx/controls/ButtonExample.mxml
+++ b/examples/mxroyale/tourdeflexmodules/src/mx/controls/ButtonExample.mxml
@@ -24,11 +24,11 @@
      <fx:Script>
         <![CDATA[
 
-            import org.apache.royale.events.Event;
+            import org.apache.royale.events.MouseEvent;
 
             // Event handler function to print a message
             // describing the selected Button control.
-            private function printMessage(event:Event):void  {
+            private function printMessage(event:MouseEvent):void  {
               message.text += event.target.label + " pressed" + "\n";
             }
 
diff --git a/examples/mxroyale/tourdeflexmodules/src/mx/controls/SimpleAlert.mxml b/examples/mxroyale/tourdeflexmodules/src/mx/controls/SimpleAlert.mxml
index 2e66589..97f4801 100755
--- a/examples/mxroyale/tourdeflexmodules/src/mx/controls/SimpleAlert.mxml
+++ b/examples/mxroyale/tourdeflexmodules/src/mx/controls/SimpleAlert.mxml
@@ -25,10 +25,11 @@
         <![CDATA[
             import mx.controls.Alert;
             import org.apache.royale.events.CloseEvent;
+            import org.apache.royale.events.MouseEvent;
         
             // Event handler function uses a static method to show
             // a pop-up window with the title, message, and requested buttons.        
-            private function clickHandler(event:Event):void {
+            private function clickHandler(event:MouseEvent):void {
                 Alert.show("Do you want to save your changes?", "Save Changes", 3, this,
alertClickHandler);
             }
         
@@ -43,7 +44,7 @@
             // Event handler function changes the default Button labels and sets the
             // Button widths. If you later use an Alert with the default Buttons, 
             // you must reset these values.
-            private function secondClickHandler(event:Event):void {
+            private function secondClickHandler(event:MouseEvent):void {
                 /*
                 Alert.buttonWidth = 100;
                 Alert.yesLabel = "Magenta";
diff --git a/examples/mxroyale/tourdeflexmodules/src/mx/controls/SimpleImage.mxml b/examples/mxroyale/tourdeflexmodules/src/mx/controls/SimpleImage.mxml
index 7ccc8c9..0b8d9fd 100755
--- a/examples/mxroyale/tourdeflexmodules/src/mx/controls/SimpleImage.mxml
+++ b/examples/mxroyale/tourdeflexmodules/src/mx/controls/SimpleImage.mxml
@@ -26,7 +26,7 @@
 				height="100%" width="100%">
 
         <mx:Label text="Image embedded in the application."/>
-        <mx:Image source="@Embed('assets/ApacheFlexLogo.png')" width="50%" height="50%"
/>
+        <mx:Image source="assets/ApacheFlexLogo.png" width="50%" height="50%" />
 
     </mx:Panel>
 </mx:Module>          
diff --git a/examples/mxroyale/tourdeflexmodules/src/mx/controls/SpacerExample.mxml b/examples/mxroyale/tourdeflexmodules/src/mx/controls/SpacerExample.mxml
index 8ccfb78..fb36dfa 100755
--- a/examples/mxroyale/tourdeflexmodules/src/mx/controls/SpacerExample.mxml
+++ b/examples/mxroyale/tourdeflexmodules/src/mx/controls/SpacerExample.mxml
@@ -29,9 +29,9 @@
             text="The Spacer control pushes the second image to the right edge of the HBox
container." />
 
         <mx:HBox width="100%">
-            <mx:Image source="@Embed('assets/ApacheFlexLogo.png')" width="50%" height="50%"
/>
+            <mx:Image source="assets/ApacheFlexLogo.png" width="50%" height="50%" />
             <mx:Spacer width="100%"/>
-            <mx:Image source="@Embed('assets/ApacheFlexLogo.png')" width="50%" height="50%"
/>
+            <mx:Image source="assets/ApacheFlexLogo.png" width="50%" height="50%" />
         </mx:HBox>
        
     </mx:Panel>
diff --git a/examples/mxroyale/tourdeflexmodules/src/mx/effects/GlowEffectExample.mxml b/examples/mxroyale/tourdeflexmodules/src/mx/effects/GlowEffectExample.mxml
index 9e1c70c..6877438 100755
--- a/examples/mxroyale/tourdeflexmodules/src/mx/effects/GlowEffectExample.mxml
+++ b/examples/mxroyale/tourdeflexmodules/src/mx/effects/GlowEffectExample.mxml
@@ -41,7 +41,7 @@
         <mx:Text width="100%"
             text="Click and hold the mouse on the image to see glowImage effect. Release
the mouse to see unglowImage effect."/>
             
-        <mx:Image source="@Embed(source='assets/ApacheFlexLogo.png')"
+        <mx:Image source="assets/ApacheFlexLogo.png"
 			width="50%" height="50%"
             mouseDownEffect="{glowImage}" 
             mouseUpEffect="{unglowImage}"/>
diff --git a/examples/mxroyale/tourdeflexmodules/src/mx/effects/MoveEffectExample.mxml b/examples/mxroyale/tourdeflexmodules/src/mx/effects/MoveEffectExample.mxml
index 3276673..f6a2e1a 100755
--- a/examples/mxroyale/tourdeflexmodules/src/mx/effects/MoveEffectExample.mxml
+++ b/examples/mxroyale/tourdeflexmodules/src/mx/effects/MoveEffectExample.mxml
@@ -45,7 +45,7 @@
 
         <mx:Canvas id="canvas" width="100%" height="100%" mouseDown="moveImage()">
 
-            <mx:Image id="img" source="@Embed(source='assets/ApacheFlexLogo.png')"
+            <mx:Image id="img" source="assets/ApacheFlexLogo.png"
 				width="50%" height="50%"/>
 
         </mx:Canvas>
diff --git a/examples/mxroyale/tourdeflexmodules/src/mx/effects/ParallelEffectExample.mxml
b/examples/mxroyale/tourdeflexmodules/src/mx/effects/ParallelEffectExample.mxml
index 809dbd2..6adda31 100755
--- a/examples/mxroyale/tourdeflexmodules/src/mx/effects/ParallelEffectExample.mxml
+++ b/examples/mxroyale/tourdeflexmodules/src/mx/effects/ParallelEffectExample.mxml
@@ -42,7 +42,7 @@
 
         <mx:Canvas id="canvas" width="100%" height="100%">
             <mx:Image id="img" x="20" y="20" width="30" height="60"
-                source="@Embed(source='assets/ApacheFlexLogo.png')"/>
+                source="assets/ApacheFlexLogo.png"/>
         </mx:Canvas>
 
         <mx:ControlBar>
diff --git a/examples/mxroyale/tourdeflexmodules/src/mx/effects/ResizeEffectExample.mxml b/examples/mxroyale/tourdeflexmodules/src/mx/effects/ResizeEffectExample.mxml
index 3d113ce..c244058 100755
--- a/examples/mxroyale/tourdeflexmodules/src/mx/effects/ResizeEffectExample.mxml
+++ b/examples/mxroyale/tourdeflexmodules/src/mx/effects/ResizeEffectExample.mxml
@@ -34,7 +34,7 @@
             text="Use the Button controls to resize the image."/>
 
         <mx:Image id="img" width="30" height="60"
-            source="@Embed(source='assets/ApacheFlexLogo.png')"/>
+            source="assets/ApacheFlexLogo.png"/>
 
         <mx:ControlBar>
             <mx:Button label="Expand" click="expand.end(); expand.play()"/>
diff --git a/examples/mxroyale/tourdeflexmodules/src/spark/controls/ButtonExample.mxml b/examples/mxroyale/tourdeflexmodules/src/spark/controls/ButtonExample.mxml
index a3e254a..d0dc92f 100644
--- a/examples/mxroyale/tourdeflexmodules/src/spark/controls/ButtonExample.mxml
+++ b/examples/mxroyale/tourdeflexmodules/src/spark/controls/ButtonExample.mxml
@@ -23,9 +23,9 @@
 	
 	<fx:Script>
 		<![CDATA[
-			import org.apache.royale.events.Event;
+			import org.apache.royale.events.MouseEvent;
 			
-			protected function buttonClickHandler(event:Event):void
+			protected function buttonClickHandler(event:MouseEvent):void
 			{
 				repeatText.text += event.target.label + " pressed!" + "\n";
 			}
diff --git a/examples/mxroyale/tourdeflexmodules/src/spark/controls/TitleWindowExample.mxml
b/examples/mxroyale/tourdeflexmodules/src/spark/controls/TitleWindowExample.mxml
index dee78e3..283cbe9 100644
--- a/examples/mxroyale/tourdeflexmodules/src/spark/controls/TitleWindowExample.mxml
+++ b/examples/mxroyale/tourdeflexmodules/src/spark/controls/TitleWindowExample.mxml
@@ -23,7 +23,8 @@
 	
 	<fx:Script>
 		<![CDATA[
-			import flash.geom.Point;
+			import org.apache.royale.geom.Point;
+            import org.apache.royale.utils.PointUtils;
 			
 			import mx.containers.TitleWindow;
 			import mx.managers.PopUpManager;
@@ -43,7 +44,7 @@
 				// Calculate position of TitleWindow in Application's coordinates. 
 				point1.x=myButton.x;
 				point1.y=myButton.y;                
-				point1=myButton.localToGlobal(point1);
+				point1=PointUtils.localToGlobal(point1, myButton);
 				login.x=point1.x+25;
 				login.y=point1.y+25;
 				
diff --git a/examples/mxroyale/tourdeflexmodules/src/spark/itemRenderers/ItemRenderer2Example.mxml
b/examples/mxroyale/tourdeflexmodules/src/spark/itemRenderers/ItemRenderer2Example.mxml
index 1d93d4c..a6034de 100644
--- a/examples/mxroyale/tourdeflexmodules/src/spark/itemRenderers/ItemRenderer2Example.mxml
+++ b/examples/mxroyale/tourdeflexmodules/src/spark/itemRenderers/ItemRenderer2Example.mxml
@@ -40,8 +40,8 @@
 			[Bindable]
 			private var employees:XMLListCollection;
 			
-			[Embed(source="data/list.xml", mimeType="application/octet-stream")]
-			private var XMLData:Class;
+			[Embed(source="data/list.xml", mimeType="text/plain")]
+			private var XMLData:String;
 			
 			private function init():void
 			{


Mime
View raw message