Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!cs.utexas.edu!uwm.edu!bionet!apple!well!oster From: oster@well.sf.ca.us (David Phillip Oster) Newsgroups: comp.sys.mac.programmer Subject: Re: When to use a _real_ moda Message-ID: <16785@well.sf.ca.us> Date: 21 Mar 90 03:32:49 GMT References: <38.26037AF7@imagery.FIDONET.ORG> <10853@hoptoad.uucp> <18601@boulder.Colorado.EDU> Reply-To: oster@well.UUCP (David Phillip Oster) Organization: Whole Earth 'Lectronic Link, Sausalito, CA Lines: 31 In article <10853@hoptoad.uucp> tim@hoptoad.UUCP (Tim Maroney) writes: >A modeless dialog can configure a modal operation perfectly well. The >dialog comes up, but the operation doesn't happen until you click the >equivalent of the OK button. If you give the same command again (e.g., >Print or Open) before clicking OK or getting rid of the window, then >the window simply comes to the front. This would work perfectly well >for both the Print dialogs and the Standard File dialogs, if the people The general problem for modeless dialogs are that if _anything_ changes, then you have to scan a list of potentially visible dialogs to see which ones _are_ visible, then change all relevant fields to be consistent with the new information. (You have to do this anyway, but in a world of modal dialogs, the set of things that are potentially visible is much smaller.) For example, suppose you have a database with three windows visible: a main window showing many records, a data entry showing one record, where the user can edit individual fields, and search window. If the user deletes a record from the main window, if that record was visible in the data entry you must clear it. If the user deleted _all_ the records, then you must dim the "(Search)" button, since there is nothing to search in (unless there is a partial record in the data window, and the data window is "above" the main window (although it may be on a different CRT even though it _is_ higher...)) Anybody have a good solution to this more general problem? I have particular trouble getting Undo to set _everything_ back the way it was before, since I like to give each window its own undo state. -- -- David Phillip Oster - Note new address. Old one has gone Bye Bye. -- oster@well.sf.ca.us = {backbone}!well!oster