NSWindowController that closes itself
NSWindowController that closes itself
- Subject: NSWindowController that closes itself
- From: Dan Bernstein <email@hidden>
- Date: Wed, 14 Nov 2001 01:40:15 +0200
I'm writing a NSWindowController subclass (but not one to be used for a
NSDocument). I've made it the NSWindow delegate for its window as well.
Now, when the user closes the window, being the NSWindow delegate I get
a windowWillClose, and I handle it by sending a message directly to some
object and then doing [self autorelease].
Under certain conditions, I would like to initiate the same process
myself, from within my NSWindowController subclass. I tried [[self
window] performClose:self], but when I do that, my windowWillClose
doesn't get called!
Why is that, and what should I do to overcome this?
TIA,
--
Dan Bernstein