[comp.sys.mac.system] Make SFDialogs movableDBoxProc

ari@eleazar.dartmouth.edu (Ari Halberstadt) (04/06/91)

In article <20072@imag.imag.fr> gourdol@imag.imag.fr (Gourdol Arnaud) writes:
>In article <1991Apr4.024724.27910@midway.uchicago.edu> jcav@quads.uchicago.edu (john  cavallino) writes:
>>I think the Standard File dialog is a relic of the days before Multifinder
>>and inter-application communication.  Especially in light of the dramatic
>>improvements in the System 7 Finder, it seems to me that there should be only
>I agree with you, the Standard File dialog shouldn't exist.
>However its disparition brings a couple of problems:
>The open commands sometimes needs aditional parameters to open its
>document (for example are the plain text file with a CR at the

If every application expects a standard file dialog, why can't Apple
make an optional file dialog which is a movable modal dialog?  Any
well written application should be able to cope with movable modal
dialogs. Lets get rid of those ugly modal dialogs, and try to restrict
their use to things like alerts and a few other truly modal
situations. Why not have a truly modeless standard file dialog? (I'm
not sure about this one, but with the advent of large screens it
wouldn't create much clutter, and it could be hidden on suspend
events.)

What's the easiest way to convert an application to modeless dialogs?
Use only one event loop! Don't call WaitNextEvent from 10 places in
your code, call it only from the top of the event loop, and make your
event loop reentrant so that it can be run from the middle of a long
calculation.  I'm not sure how this fits into MacApp, but I imagine
MacApp does a similar thing. Converting alerts into dialogs also
simplifies life (I'm prepared to defend this position, so only flame
me about this if you want to have fun :).

231b3679@fergvax.unl.edu (Mike Gleason) (04/06/91)

ari@eleazar.dartmouth.edu (Ari Halberstadt) writes:

>In article <20072@imag.imag.fr> gourdol@imag.imag.fr (Gourdol Arnaud) writes:
>>In article <1991Apr4.024724.27910@midway.uchicago.edu> jcav@quads.uchicago.edu (john  cavallino) writes:
>>>I think the Standard File dialog is a relic of the days before Multifinder
>>>and inter-application communication.  Especially in light of the dramatic
>>>improvements in the System 7 Finder, it seems to me that there should be only
>>I agree with you, the Standard File dialog shouldn't exist.
>>However its disparition brings a couple of problems:
>>The open commands sometimes needs aditional parameters to open its
>>document (for example are the plain text file with a CR at the

>If every application expects a standard file dialog, why can't Apple
>make an optional file dialog which is a movable modal dialog?  Any
>well written application should be able to cope with movable modal
>dialogs. Lets get rid of those ugly modal dialogs, and try to restrict
>their use to things like alerts and a few other truly modal
>situations. Why not have a truly modeless standard file dialog? (I'm
>not sure about this one, but with the advent of large screens it
>wouldn't create much clutter, and it could be hidden on suspend
>events.)

When I was working on my Amiga WDEF, I stuck in a little hack so that whenever
a 'hit' was detected inside a dialog box's "drag" region, I just stuck in
my own DragWindow() call.  It's still modal, but atleast you can move the
bugger around.  What a feeling of power it is to be able to move the Standard
File dialogs around...  I imagine Apple's Human Interface Death Squad wouldn't
like it much...

_mike gleason
 university of nebraska