keeping and NSDocument open after all windows are closed
keeping and NSDocument open after all windows are closed
- Subject: keeping and NSDocument open after all windows are closed
- From: Edwin Zacharias <email@hidden>
- Date: Fri, 24 May 2002 18:13:30 -0400
I've been trying to keep an NSDocument subclass open after all windows
have been closed. It seems that window controllers call dealloc when
all of them are closed, but I'm not sure. I found the following methods:
- (void)shouldCloseWindowController:(NSWindowController
*)windowController delegate:(id)delegate
shouldCloseSelector:(SEL)callback contextInfo:(void *)contextInfo
- (void)canCloseDocumentWithDelegate:(id)delegate
shouldCloseSelector:(SEL)shouldCloseSelector contextInfo:(void
*)contextInfo
These just don't seem right. They don't even seem like Cocoa. They are
extremely hard to use and hard to understand. Is there a better or
easier way to not close a document when all the windows close? If not,
how would I use these. I must be doing something wrong because right
now I'm creating function pointers, and that's just not good looking
Objective-C.
- Edwin
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.