Re: -[NSWindow orderOut:] vs. -[NSWindow performClose:]
Re: -[NSWindow orderOut:] vs. -[NSWindow performClose:]
- Subject: Re: -[NSWindow orderOut:] vs. -[NSWindow performClose:]
- From: Kyle Sluder <email@hidden>
- Date: Thu, 19 May 2011 13:46:55 -0700
On Thu, May 19, 2011 at 1:34 PM, Jeff Johnson
<email@hidden> wrote:
> Wouldn't you want to tie a notification to the OK action rather than to the window closing? I don't know if you have a Cancel too, but if so, you wouldn't want that to bring the window forward.
I'm using the window closing notification so that the next time it's
shown using -[NSWindowController showWindow:] it's not still attached
to the old document window. The OK button action (defined on my
NSWindowController subclass) brings the remembered document window
forward and calls -close on the shared panel.
I suppose I could just require that clients of the shared panel use a
-presentPanelForDocumentWindow: method rather than calling
-showWindow:, and not worry about cleaning up the backreferences from
the shared panel at close.
> It's kind of disappointing that nobody else has chimed in on this thread, because it's a pretty fundamental Cocoa issue.
Yeah, I was kind of hoping for a bit of elaboration on this topic, but
I suppose the best people to discuss it are very much busy with Lion.
--Kyle Sluder
_______________________________________________
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