3.3 Running GUIs

All you have to do to create and run GUIs declared using XML is to write a few lines of Hollywood code. Let's assume you saved the example GUI XML definition from above into a file named GUI.xml, all you would have to do now to create and show this GUI from a Hollywood script is creating a Hollywood script with the following lines:

 
@REQUIRE "RapaGUI"
moai.CreateApp(FileToString("GUI.xml"))
Repeat
   WaitEvent
Forever

That's all! When you run the Hollywood script from above, your GUI will automatically be created and shown, no matter if your script is running on Windows, Linux, macOS, or AmigaOS.


Show TOC