Added code to test menu change, for some reason this doesn't work yet.

Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/4eb3eaf3
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/4eb3eaf3
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/4eb3eaf3

Branch: refs/heads/feature/browser-event
Commit: 4eb3eaf38277187919c24b9a6099ec998d4ff627
Parents: 981ffb8
Author: DESKTOP-RH4S838\Yishay <yishayj...@hotmail.com>
Authored: Tue Jul 25 14:01:06 2017 +0300
Committer: DESKTOP-RH4S838\Yishay <yishayj...@hotmail.com>
Committed: Tue Jul 25 14:01:06 2017 +0300

----------------------------------------------------------------------
 examples/flexjs/MDLExample/src/main/flex/Menus.mxml | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4eb3eaf3/examples/flexjs/MDLExample/src/main/flex/Menus.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/src/main/flex/Menus.mxml 
b/examples/flexjs/MDLExample/src/main/flex/Menus.mxml
index 6f65315..d7bc721 100644
--- a/examples/flexjs/MDLExample/src/main/flex/Menus.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/Menus.mxml
@@ -25,6 +25,14 @@ limitations under the License.
     <fx:Script>
         <![CDATA[
             import org.apache.flex.mdl.materialIcons.MaterialIconType;
+                       import org.apache.flex.events.Event;
+                       import org.apache.flex.html.SimpleAlert;
+
+                       protected function 
myMenu_changeHandler(event:org.apache.flex.events.Event):void
+                       {
+                               SimpleAlert.show("You selected: " + 
myMenu.selectedItem.label, topMostEventDispatcher);
+                       }
+
         ]]>
        </fx:Script>
 
@@ -43,7 +51,7 @@ limitations under the License.
             </mdl:materialIcon>
         </mdl:Button>
 
-        <mdl:Menu dataMdlFor="menu_btn" ripple="true" bottom="true" 
left="false"
+        <mdl:Menu id="myMenu" dataMdlFor="menu_btn" ripple="true" 
bottom="true" left="false" change="myMenu_changeHandler"
                   labelField="label" className="customMenuItemRenderer">
             <mdl:beads>
                 <js:ConstantBinding

Reply via email to