Area.ContextMenu has the applicability of IS.
On AmigaOS3 everything works well, but on Linux (could not test on Win/Mac)
the Menus are shown, but their events arent handled.
A Bug??
Best regars
George
A small code-snippet:
Code: Select all
@REQUIRE "RapaGUI"
xml$=[[
<?xml version="1.0" encoding="iso-8859-1"?>
<application id="app">
<menu title="Menu" id="ctxmenu">
<item id="req1">Requester 1</item>
<item id="req2">Requester 2</item>
<item id="quit">Beenden</item>
</menu>
<window>
<hgroup>
<button id="testbutton">TestButton</button>
<rectangle/>
</hgroup>
</window>
</application>
]]
Function p_eventfunc(msg)
Switch msg.id
Case "req1" moai.request("Ok","Requester 1","Ok")
Case "req2" moai.request("Ok","Requester 2","Ok")
Case "quit" end()
EndSwitch
EndFunction
InstallEventHandler({Rapagui=p_eventfunc})
moai.createapp(xml$)
moai.set("testbutton","contextmenu","ctxmenu")
Repeat
WaitEvent()
Forever