Code: Select all
@REQUIRE "RapaGUI"
moai.CreateApp([[
<?xml version="1.0" encoding="iso-8859-1"?>
<application>
<window title="Test program">
<vgroup>
<button>Hello World!</button>
</vgroup>
</window>
</application>
]])
InstallEventHandler({RapaGUI = Function(msg)
If msg.attribute = "Pressed" Then DebugPrint("Button pressed!")
EndFunction})
Repeat
WaitEvent
Forever
But for some reason the eventhandler does not seem to be triggered, so the DebugPrint is not happening. What is missing in the example?
For the moai.CreateDialog and moai.CreateObject examples, they will both return errors and will not run at all.
Do these examples need to be added to some other existing program to work, or are there something wrong/missing from those eamples?