Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!bu-cs!purdue!decwrl!thundr.dec.com!minow
From: minow@thundr.dec.com (Repent! Godot is coming soon! Repent!)
Newsgroups: comp.sys.mac.programmer
Subject: Problem with GhostWindows and non-modal dialogs
Message-ID: <8811301915.AA22929@decwrl.dec.com>
Date: 30 Nov 88 22:13:00 GMT
Organization: Digital Equipment Corporation
Lines: 31

I'm writing an application with -- roughly -- the following structure:

1-4 windows on the screen, each containing a list (using the list manager).
A non-modal dialog floats on top of the windows.

The user clicks on a list cell, then types a number in the dialog box.
The number (after some computation), then updates the list.
(The program will be used for computing mile splits during a marathon.
The list window will contain other timing-related information such as the
course record for each split distance.)

If I use the GhostWindow global to force the dialog to "float" above
the display windows, IsDialogEvent doesn't recognize any events in
the dialog window (perhaps it's calling FrontWindow?).

I would rather not have to stuff in all of the MacTutor "Floating
Palettes" (and am not sure if this will work together with a text-edit
dialog).  Also, doing something like
	GetNextEvent();
	GhostWindow = NIL
	if (IsDialogEvent ...)
	   ...
	GhostWindow = dialog_window;
just to sneak by IsDialogEvent seriously offends my sensibilites.

Any suggestions as to a better way to solve my problem would be welcome.

Thanks.

Martin Minow
minow%thundr.dec@decwrl.dec.com