This is an automated email from the ASF dual-hosted git repository.

carlosrovira pushed a commit to branch feature/jewel-ui-set
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git


The following commit(s) were added to refs/heads/feature/jewel-ui-set by this 
push:
     new f788ab2  fix some cohercions in example events
f788ab2 is described below

commit f788ab25e024289a4f9b4091d5a14a8c254a2280
Author: Carlos Rovira <carlosrov...@apache.org>
AuthorDate: Mon Apr 2 00:55:12 2018 +0200

    fix some cohercions in example events
---
 examples/royale/JewelExample/src/main/royale/AlertPlayGround.mxml | 3 ++-
 examples/royale/JewelExample/src/main/royale/LabelPlayGround.mxml | 8 +++++---
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/examples/royale/JewelExample/src/main/royale/AlertPlayGround.mxml 
b/examples/royale/JewelExample/src/main/royale/AlertPlayGround.mxml
index 5c66d3c..c9a81b9 100644
--- a/examples/royale/JewelExample/src/main/royale/AlertPlayGround.mxml
+++ b/examples/royale/JewelExample/src/main/royale/AlertPlayGround.mxml
@@ -27,10 +27,11 @@ limitations under the License.
                <![CDATA[
                        import org.apache.royale.jewel.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 {
                 var alert:Alert = Alert.show("Do you want to save your 
changes?", "Save Changes", 3);
                                alert.addEventListener(CloseEvent.CLOSE, 
alertClickHandler);
                 alert.height = 300;
diff --git a/examples/royale/JewelExample/src/main/royale/LabelPlayGround.mxml 
b/examples/royale/JewelExample/src/main/royale/LabelPlayGround.mxml
index a61d2f3..9d68b01 100644
--- a/examples/royale/JewelExample/src/main/royale/LabelPlayGround.mxml
+++ b/examples/royale/JewelExample/src/main/royale/LabelPlayGround.mxml
@@ -25,9 +25,11 @@ limitations under the License.
     
        <fx:Script>
                <![CDATA[
-        private function labelClick(event:Event):void
+        import org.apache.royale.events.MouseEvent;
+
+        private function labelClick(event:MouseEvent):void
         {
-               trace("jewel label clicked");
+               label.text = "jewel label clicked";
         }
        ]]>
        </fx:Script>
@@ -38,6 +40,6 @@ limitations under the License.
        
        <html:H3 text="Jewel Label"/>
        
-       <j:Label text="This is a Label" click="labelClick(event)"/>
+       <j:Label id="label" text="This is a Label" click="labelClick(event)"/>
        
 </js:Group>

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

Reply via email to