Code: Select all
@REQUIRE "RapaGUI"
moai.CreateApp([[
<?xml version="1.0" encoding="iso-8859-1"?>
<application id="app">
<window id="appWindow" notify="closerequest">
<vgroup>
<hgroup>
<button id="button">Button</button>
</hgroup>
<rectangle/>
</vgroup>
</window>
</application>
]])
moai.CreateObject([[
<window>
<vgroup>
<popfile/>
</vgroup>
</window>
]])
Function p_EventFunc(msg)
Switch msg.attribute
Case "CloseRequest":
moai.Set("appWindow","Open",False)
End
EndSwitch
EndFunction
InstallEventHandler({RapaGUI = p_EventFunc})
Repeat
WaitEvent
Forever
End