plugins.window.createPopupMenu()

I’ve struck a problem with plugins.window.createPopupMenu() in WC but not SC.

I have a large cascading popup menu which works but is slow to load, as it requires about 800 line of code.
In order to make it more snappy, I thought to make each section of the cascade with it’s own method. So the top menu looks like

function createMenuTop() {
var menuTop = plugins.window.createPopupMenu()

	// define the top level menu

	menuTop.addMenuItem('MENU A', createMenuA)
	menuTop.addMenuItem('MENU B', createMenuB)
	menuTop.addMenuItem('MENU C', createMenuC)
	menuTop.addMenuItem('MENU D', createMenuD)

	menuTop.show(5,200);

}

and Selecting the first option runs this code

function createMenuA() {
var menuA= plugins.window.createPopupMenu()

	// define the top level menu

	menuA.addMenuItem('MENU A1', createMenuA1)
	menuA.addMenuItem('MENU A2', createMenuA2)
	menuA.addMenuItem('Option A3', executeA3)
	menuA.addMenuItem('<== Back', createMenuTop)

	menuA.show(5,200);

}

I can get Menu A display from Top Menu, but the methods on the second menu to open only execute in SC, not WC. In the latter, the menu just closes, nothing triggers. No errors in the log. This is with SV 5.2.10, Mac OSX 10.6.
Any suggestions on how I can achieve this?

I also note that with my old cascading menus, they display ok in WC with Safari and Firefox, but with IE I get reports that only the top level menu displays.

I should add that I’m using the custom servoy_web_client_default.css as this has a nice effect on menus and other UI elements.

Still trying to resolve this.
Stated simply, in WC but not SC, if a menu item in plugins.window.createPopupMenu() calls a method to create a new Popup, the second menu displays but the methods on the menu items don’t fire.
This is with Servoy 5.2.10
For reasons stated in the first post, I don’t want to use cascading menus, I want the first popup to close and display a second popup.
Any advice or workarounds gratefully accepted.

You could create your cascading menus in your solution onOpen method and save them in a variable to be called when needed, no need to recreate them all the time.

As to replacing one menu by another on the fly, from a method inside a menu, I wouldn’t have though it to work in WC.

Thanks for the response Patrick. I did try to save the menu as a form variable, it did help with the speed. I still have the problem that the deep levels are too wide for the screen. I’m also seeing a bug in IE browsers where they don’t display the cascading sub menus, only the parent/top.

Tony,

Please file a case in our support system with a sample attached.
Best to create a separate case for each issue you see (you can use the same sample).

Rob

Created issue SVY-921