Re: wired things about NSApp Modal
Re: wired things about NSApp Modal
- Subject: Re: wired things about NSApp Modal
- From: Jens Alfke <email@hidden>
- Date: Sat, 9 Feb 2008 16:06:36 -0800
On 8 Feb '08, at 6:50 PM, cai qin wrote:
I got a Window A. I call [NSApp RunModalForWindow] to make it modal
Inside Window A's notification method , windowDidBecomeKey , I call
[NSApp
abortModal] ,What I want to do is that not letting the window
showing up.
But the window is still showing up as Modal window ,but when you
switch the
app to others and then switch back , the window disappeared , and
the Modal
stops.
Did you tell the window to become key? Perhaps it's not becoming key
until you switch to another app and then back. You could set a
breakpoint in your windowDidBecomeKey method to find out.
Overall, though, it's better to avoid modal windows if possible. They
can be frustrating or confusing to the user. Use sheets or modeless
panels instead.
—Jens_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden