• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
keeping and NSDocument open after all windows are closed
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Re: NSTextField Attributes
  • Next by Date: Re: text views and dynamic reflow
  • Previous by thread: Re: CGDisplayCapture() & CGShieldingWindowLevel()
  • Next by thread: Re: text views and dynamic reflow
  • Index(es):
    • Date
    • Thread