Submenus in ContextMenus---Double Notifications (RapaGUI)

Discuss GUI programming with the RapaGUI plugin here
Post Reply
PEB
Posts: 263
Joined: Sun Feb 21, 2010 1:28 am

Submenus in ContextMenus---Double Notifications (RapaGUI)

Post by PEB » Sat Nov 16, 2019 2:05 pm

This might only be an issue on OS4. (I haven't checked it on other systems.)

When an item is selected in a submenu within a ContextMenu two notifications are triggered (though only the first one includes the "Parent" item in the event message).

Here is some test code:

Code: Select all

@REQUIRE "RapaGUI"

EnableLayers()

AppGUI$=[[<application id="app">
<menu title="Test Menu" id="Menu">
	<item id="Cut">Cut</item>
	<item id="Copy">Copy</item>
	<item id="Paste">Paste</item>
	<menu title="Edit">
		<item id="Cut2">Cut</item>
		<item id="Copy2">Copy</item>
 		<item id="Paste2">Paste</item>
	</menu>
</menu>
<window id="Main" Title="Test">
	<vgroup>
		<hollywood display="1" fixwidth="true" fixheight="true"  contextmenu="Menu"/>
	</vgroup>
</window>
</application>]]

moai.CreateApp(AppGUI$)

Function p_TestFunc(msg)
	DebugPrint(msg.id)
EndFunction

InstallEventHandler({RapaGUI=p_TestFunc})

Repeat
	WaitEvent
Forever

User avatar
airsoftsoftwair
Posts: 3208
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Submenus in ContextMenus---Double Notifications (RapaGUI)

Post by airsoftsoftwair » Sun Nov 17, 2019 12:51 pm

Thanks, will be fixed.

Post Reply