[comp.sys.mac.programmer] non-modal dialog boxes

bowman@reed.UUCP (Eric Bowman) (02/21/90)

I'm writing a program to do various population biology simulations, and
had originally decided to maintain each simulation's parameters through
non-modal dialog boxes.  The user selects the simulation from a menu, and
a graphics window and the appropriate non-modal dialog appear.

The problem I am having is this:  When the user switches simulations, I
can't figure out how to switch dialogs.  I perform a HideWindow on the
previous dialog, and select and set the port to the new dialog, but when
I call DialogSelect with a pointer to the new dialog, it replaces my
DialogPtr with a pointer to the OLD dialog.

I'd rather load all four dialog templates at initialization to prevent
heap fragmentation -- I may have to scrap this and just keep opening and
closing dialog boxes.

Any help would be greatly appreciated here.
(Feel free to tell me to stop being lazy and use the window manager, if
that's the best solution)

Thanks,
==============================================================================
| The Insidious Uncle BoBo                                                   |
------------------------------------------------------------------------------
|  "As I see it, my friends can access my private                            |
|   members in a public class..."                                            |
==============================================================================
| Eric Bowman ->                                                             |
| ShitNet:         bowman@reed.bitnet                                        |
| FarFromFreeNet:  (503)234-7158  (Like I'll Really Answer)                  |
| Disclaimer: "If my employer ever found out my opinions, well..."           |
/=\=/=\=/=\=/=\=/=\=/=\=/=\=/=\=/=\=/=\=/=\=/=\=/=\=/=\=/=\=/=\=/=\=/=\=/=\=/=