New Window

How Does “New Window” Work With SeedCode Complete?

FileMaker Pro allows users to create multiple open windows onto the same file. This is great for comparing two different list views of the same table, for instance. While the calendar component makes use of this new window property when editing appointments, the New Window option does not offer calendar users the kind of comparative scenario it might seem to.

While FileMaker’s multiple-windows feature works great when comparing found sets, it is not very useful for comparing two calendars. The reason is this: calendars decide which dates to display based upon global variables, not found sets. While FileMaker can maintain a separate found set in each window, it can not easily maintain a separate global variable for each window. Accordingly, if you create a new window in month view, for instance, you’ll see two month views. However, if you change the date of one, the other will change as well soon enough.

The best way to compare two different months is to simply toggle between them in the same window using the arrows below the date in the month view’s upper left corner.

Calling New Windows in Scripts

SeedCode Complete offers you a couple of scripts to make calling and managing new windows easier...

A new data entry window. The script "Draw New Mini Window ( LayoutName..." is used throughout the solution to draw new mini windows, like those used to show Assign Colors, the Contact Selector, etc. This is the script you want to call any time you create a new window that the user should see. See the comments at the head of the script for notes about the acceptable parameters.
A new off-screen window. There are two scripts used for drawing off-screen windows. You may want to draw off-screen windows when you need to leave the current context to perform some work and then return leaving the user's focus unchanged.
When creating new routines you should always use "Draw New Off-Screen Window - Main". Some of our calendar scripts use "Draw New Off-Screen Window" which has a reserved window name the calendar looks for: don't call this in new scripts.

Closing new windows.

Both on and off screen windows can be closed by calling the script "Close Window". This script will close the window unless it is the main solution window (has the same name as $$sc_SolutionWindowNamd) or it is the last open window in the solution.

Follow us: