Whenever possible I try to take away the ability to have multiple windows. Like you said it creates a lot of baggage to look after. If there is a legitimate need to see certain data side by side I make a layout for that.
Supporting multiple windows is also a hassle for iOS and not really supported with WD without another connection used. I try to stay single window.
Just my opinion. If multi windows are needed I build around that particular need for that particular client.
Check if the window already exists before creating a new one in your "new window" script step. Do this:
Select Window["Window name"]
If[ get(lasterror) = 112 ]
New Window["Window name"]
2 of 2 people found this helpful
Carl has good advice but you also need to take away the menu item for new window and control window names as they are opened. Otherwise you get a bunch of "new window...2,3,4".
Ah yes, I'm a big fan of using FileMaker Pro Advanced to create custom menus. I forgot those menu items still exist!
A technique I use if in addition to a parent window, a new (child) window is required - without having to create and maintain new layouts - is to restrict the user's ability to navigate away from the child window. This is achieved by hiding navigation elements on the child window when the window count is higher than 1 (i.e. the lone parent window).
The "Hide object when..." calculation is: ValueCount ( WindowNames ( "yourFileName") ) > 1
With FM16, the new Card feature should help with this issue.
I have one solution that also includes an appointment calendar. I have a main menu layout and clicking the icon goes to it all times (closing every window, except one). My users love that, but at times desire the calendar to be open at the same time. I added an option in the menu to "keep open" (the calendar). Now when they have the monitor space (wide or multiple), the calendaring stays open at the same time. Yes there is an icon (to menu) on the calendar, but the branch test will check the "flag" and go to the other window, rather than close the calendar before going to the main menu. Yes, the 'normal' close is still available (OS).
Multiple windows were fantastic in the past when there was limited functionality and people were trained how to use the software. I couldn't imagine, as a developer, being without them or using our internal databases (cobbler and shoes) without.
However, with an 'app' where everything is controlled we very rarely allow multiple windows, controlling use in a modal style and prevent 'sideways' navigation.
We're currently taking over some development from an in house system where not only are multiple windows allowed with all the functionality of the system, but every window is given a name so you can easily end up in say 'invoices' in a window that says 'purchase orders'.
Restricting use is the lesser of two evils - unless I'm needing to use it
I was talking to a rep years ago and told them how nice it would be if FMP would incorporate frames. One window that would allow you to target a frame with a table/layout. I am glad I am not the only one that finds this annoying to navigate. Would be nice to have a main menu you don't have to change for every layout if you want your menu to be in the same window.
type the word 'layout' under the Ideas space for a search.