Re: Manual KVO quirks with NSDocument and NSWindowController
Re: Manual KVO quirks with NSDocument and NSWindowController
- Subject: Re: Manual KVO quirks with NSDocument and NSWindowController
- From: Tim Lucas <email@hidden>
- Date: Wed, 1 Jun 2005 15:22:33 +1000
On 01/06/2005, at 2:40 PM, Andrew White wrote:
Tim Lucas wrote:
On 01/06/2005, at 1:48 PM, Andrew White wrote:
For now, I'd rather work around the problem completely and hook
either the "disconnect from document" or "my window closed" event in
the NSWindowController, thus allowing me to cleanly de-register KVO.
How do I hook this event?
-(void)windowDidClose:(NSNotification*)aNotification
Ah, delegate the NSWindowController from the NSWindow, and catch the
event that way. :)
...and in case you don't know, the NSWindowController is automatically
registered for notifications from its associated window... so no need
to set the delegate outlet =)
If you want to prevent the window from closing using windowShouldClose:
you'll need to set it as the delegate though...
- tim lucas
_______________________________________________
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