Page 1 of 1

Submenus in ContextMenus---Double Notifications (RapaGUI)

Posted: Sat Nov 16, 2019 2:05 pm
by PEB
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

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

Posted: Sun Nov 17, 2019 12:51 pm
by airsoftsoftwair
Thanks, will be fixed.

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

Posted: Sun Dec 22, 2019 4:48 pm
by airsoftsoftwair

Code: Select all

- Fix [Amiga]: Nested context menu items triggered twice