[comp.sys.mac.programmer] how does modal dialog disable suspend/resume/activate events?

andre@cs.pitt.edu (06/27/91)

how does the dialog manager disable suspend, resume, and activate
events while doing a modal dialog?

i need to have a dialog that looks like a file dialog but is not.  i
am using the list manager to handle the list elements, scrolling, etc.
i started out using the dialog manager with a scary looking filter
procedure to pass off events to the list manager.  somewhere in the
middle of this i came across tn #203 which basically said, "andre,
don't do what you're doing because the dialog manager wasn't intended
for all this."  

do i rewrote everything using windows, but i want activate events to
be supressed along with suspend and resume events.  i have tried all
kinds of things but nothing works.

so, a) how does a modal dialog do it,?
    b) should i have ignored tn #203
       because noone has any trouble using the dialog manager to do
       bizarre tricks?

thanks.

								-andre.

--
Andre Srinivasan  :"If you ain't bleeding, you ain't working."
317 MIB	          :			- Pete The Master Tombstone Cutter
U. of Pittsburgh  :"If it bleeds, we can kill it."
andre@cs.pitt.edu :			- Arnold Schwarzenager

gurgle@well.sf.ca.us (Pete Gontier) (06/28/91)

andre@cs.pitt.edu writes:
>how does the dialog manager disable suspend, resume, and activate
>events while doing a modal dialog?

It doesn't. The window manager and event manager conspire to make this
happen. All you need to do is use a window with the same procID as the
standard modal dialog and you won't be switched out.

I'm not sure what you hope to achieve by disabling activate events. If
you don't like them, you can ignore them. If you're worried about what
happens to title bars and other parts of windows when they change
position in the window list, that's managed by the window manager.
Activate events are a symptom of that, not the cause.

Boy, I hate vi.

>    b) should i have ignored tn #203
>       because noone has any trouble using the dialog manager to do
>       bizarre tricks?

I don't have any problems at all with the dialog manager. It's not as
snappy in the performance department as window manager/control manager
code, but it's not that much of a big deal. I think DTS issued that tech
note because the dialog manager is hard to support. I think they're
going to be faced with much more dialog manager email now that balloon
help supports the dialog manager. In any case, it's a qualitative
judgement. The dialog manager is not God, and it just won't do some things.
On the other hand, it can save you a lot of time.

I really hate vi.
-- 
 Pete Gontier, gurgle@well.sf.ca.us
 Software Imagineer, Kiwi Software, Inc.