mui.CreateGUI(xml$)
FileToString()
Hollywood function.
Once this function returns, you can talk to all your MUI objects that you have defined in the XML GUI declaration using the mui.Set(), mui.Get() and mui.DoMethod() functions.
Please note that there can be only one application object per task so this
function can only be called once. If you want to call mui.CreateGUI()
a second
time, you have to free the old GUI first using the mui.FreeGUI() call.
If you need to dynamically add objects like windows or buttons to your application object, you can use the mui.CreateObject() function to do this.
mui.CreateGUI([[ <?xml version="1.0" encoding="iso-8859-1"?> <application> <window title="Test program" notify="closerequest"> <vgroup> <button>Hello World!</button> </vgroup> </window> </application> ]]) InstallEventHandler({MUIRoyale = Function(msg) If msg.attribute = "CloseRequest" Then End EndFunction}) Repeat WaitEvent ForeverThe code above creates a minimal GUI, just with a window and a single button.