SmartClient Version: v12.0p_2018-05-26/AllModules Development Only (built 2018-05-26)
Chrome on OSX
please try this sample in the showcase:
you'll see that the shortcut key does not work.
It only works if I declare the menu items at init time:
Is it a bug, or is it by design? This is stopping me from changing the menu items at runtime.
Chrome on OSX
please try this sample in the showcase:
Code:
var menuItems = [ {title: "test", keyTitle: "Alt+A", keys: {altKey: true, keyName: "A"}, click:"isc.logEcho('Alt+A pressed')"} ]; isc.Menu.create({ ID: "menu", autoDraw: false, showShadow: true, shadowDepth: 10 }); menu.setData(menuItems); var menuButton = isc.MenuButton.create({ ID: "menuButton", autoDraw: false, title: "File", width: 100, menu: menu }); isc.HStack.create({ width: "100%", members: [menuButton] });
It only works if I declare the menu items at init time:
Code:
var menuItems = [ {title: "test", keyTitle: "Alt+A", keys: {altKey: true, keyName: "A"}, click:"isc.logEcho('Alt+A pressed')"} ]; isc.Menu.create({ ID: "menu", autoDraw: false, showShadow: true, shadowDepth: 10, data: menuItems }); var menuButton = isc.MenuButton.create({ ID: "menuButton", autoDraw: false, title: "File", width: 100, menu: menu }); isc.HStack.create({ width: "100%", members: [menuButton] });
Comment