The code works.
AmigaOS 3.9:
The context menu did not trigger any events.
AROS x86:
The first time you right-click, Hollywood exits. The workbench is reset.
Code: Select all
@REQUIRE "RapaGUI"
@DISPLAY 1, {Width = 320, Height = 100}
GUI$=[[<application id="app">
<menu title="Test" id="contex">
<item id="Cut">Cut</item>
<item id="Copy">Copy</item>
<item id="Paste">Paste</item>
</menu>
<window id="Main" Title="Test">
<vgroup>
<treeview id="tree" contextmenu="contex" notify="active">
<column/>
<node name="test1" id="test1">
</node>
<node name="test2" id="test2">
</node>
</treeview>
<hollywood display="1" fixwidth="true" fixheight="true"/>
</vgroup>
</window>
</application>]]
moai.CreateApp(GUI$)
Function p_EventFunc(msg)
NPrint(msg.id)
EndFunction
InstallEventHandler({RapaGUI=p_EventFunc})
Repeat
WaitEvent
Forever