Re: Modal dialog alternatives?
Re: Modal dialog alternatives?
- Subject: Re: Modal dialog alternatives?
- From: John Timmer <email@hidden>
- Date: Fri, 17 Jun 2005 08:35:45 -0400
> That was my idea, but I'm still getting the problem that if I display
> a modal dialog then switch out of the application and back again it's
> possible to select the lower window and bring it in front of the
> dialog. It's possible that with a lot of faffing around I can cope
> with all eventualities but to be honest I'd be concerned that the
> next change to the OS would break it again. I'll try with sheets and
> see if my clients will stomach them, if not I'll stick with Carbon
> and CW.
This should be easy to fix. First off, if you can make a simple example of
this, file a bug on it. You can also work around it in the mean time.
NSApplication has a modalWindow method that returns nil if nothing's modal.
If you've got an application delegate, use its
"applicationWillBecomeActive:" notification to send the modal window a
"makeKeyAndOrderFront:" message.
If you don't have an app delegate, have your window's delegate (typically
its controller) test the modalWindow value in its "windowDidBecomeKey:"
notification and if its not nil, tell the modal window to become key.
Either one should ensure that the modal window's on top when the app comes
to the front.
Sticking with deprecated technology (CW) and designing your application
around users that dislike change is a better recipe for having problems due
to OS upgrades than going with Cocoa and filing bugs when necessary. I
assume you wouldn't be thinking Cocoa in the first place if you weren't
concerned about long-term maintenance and improvement.
Besides, having used sheets, I personally have come to detest modal dialogs
(as for nested modals...). They visually suggest that you should be able to
copy information from inactive windows and paste it into the dialog, then
refuse to allow you to do so. The sheet at least lets you know where you
stand.
JT
_______________________________________________
This mind intentionally left blank
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden