Multiple Windows

Discuss GUI programming with the MUI Royale plugin here
Post Reply
djrikki
Posts: 682
Joined: Wed Apr 06, 2011 12:26 am

Multiple Windows

Post by djrikki » Wed Jan 16, 2013 7:19 pm

Hi,

Documentation suggests its possible to open multiple windows, but how exactly do I pull this off?

I have tried creating two separate XML files which work correctly individual, but if I use the below...

Code: Select all

mui.CreateGUI(FileToString("gui.xml"))
mui.CreateGUI(FileToString("preview.xml"))
Compile and run the application...

The first window opens briefly (I see it flicker and close) leaving the second window only visible.
Evolve - Rapid GUI Development tool for MUI Royale and RapaGUI
http://myevolve.wordpress.com

djrikki
Posts: 682
Joined: Wed Apr 06, 2011 12:26 am

Re: Multiple Windows

Post by djrikki » Wed Jan 16, 2013 7:21 pm

Just to add both XMLs start with the xmlversion and encoding string followed by the application base... however if I remove <application> and </application> from the second xml the app now fails to run.
Evolve - Rapid GUI Development tool for MUI Royale and RapaGUI
http://myevolve.wordpress.com

djrikki
Posts: 682
Joined: Wed Apr 06, 2011 12:26 am

Re: Multiple Windows

Post by djrikki » Wed Jan 16, 2013 7:24 pm

Nevermind, I get it... all gui elements no matter what they are must reside in one xml file.
Evolve - Rapid GUI Development tool for MUI Royale and RapaGUI
http://myevolve.wordpress.com

zenzizenzizenzic
Posts: 9
Joined: Fri Mar 15, 2019 2:35 pm

Re: Multiple Windows

Post by zenzizenzizenzic » Sat Apr 13, 2019 7:08 pm

How were you able to get this to work? I keep getting a "ID must be a FourCC!" error everytime I try.

User avatar
jPV
Posts: 237
Joined: Sat Mar 26, 2016 10:44 am
Location: RNO
Contact:

Re: Multiple Windows

Post by jPV » Mon Apr 15, 2019 7:35 pm

You can put all window definitions into the same XML file, next to each other under the application tags. For example like this. If you don't want them all displayed at the start, set open="false" for those you want to be hidden, and manually open them when you need.

Another option would be to create a new definition with the mui.CreateObject and then attach it with the Application.AddWindow.

But the "ID must be a FourCC!" is probably related to wrongly defined MuiID.

zenzizenzizenzic
Posts: 9
Joined: Fri Mar 15, 2019 2:35 pm

Re: Multiple Windows

Post by zenzizenzizenzic » Tue Apr 16, 2019 4:14 pm

I think that addresses the issue. Thank you!

Post Reply