Re: GUI Map loading
User (email@example.com) posted:
You can have multiple gui maps loaded at the same time but a window can not be in more than one gui map that is loaded so if you load 3 gui maps and two of them have the same window, then the second gui map will not be loaded because the window already exists in the first gui map. If you find that your gui maps have the same windows, you may want to rethink your approach for creating gui maps.
Thanks. I'll check it.
At 02:04 PM 5/8/2001 +0100, you wrote:
Before you run the
GUI_load() function, make sure
that you run the GUI_close or GUI_close_all functions as there can only
be one GUI map loaded at any time.
Re: Re: GUI Map loading
Not necessarily so.
There is a super-secret special code that allows you to load GUI files that access the same window.
This is useful if, for example, you want to seperate object types into different GUI maps. We took this approach because of objects common to several different windows - we don't want to record them for each seperate window.
The problem occurs when you load a map that has saved buttons in the Main_Window and then you try to load a second map that has saved text fields in Main_Window. An error will occur saying you cannot load the text fields map because the Main_Window already exists. To deal with this problem, use "allow_shadowing":
Cool, eh? Helped us out tons. It becomes absolutely essential if seperating your objects by a criteria other than the window name is necessary.
The only real problem that you might run into (and is certainly the reason Mercury does not make this parameter public knowledge) is if you have two different objects or windows with the same logical name. Since our program doesn't have this problem, I don't know what sort of a conflict occurs. The gui_load statement probably may just overwrite the first, or disregard the second.
Hope this helps someone out there,