• 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
NSDocumentController Subclass Response
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSDocumentController Subclass Response


  • Subject: NSDocumentController Subclass Response
  • From: Ronnie O <email@hidden>
  • Date: Wed, 29 Jun 2005 19:56:13 -0500

I was reading the docs about NSDocumentController and noticed it
mentioned the rarity in which it would need to be subclassed.  I was
condisering doing this and started playing with the option and ended
up a little confused.  I simply started a new "Cocoa Application" and
in the "MainMenu.nib" subclassed NSDocumentController, instantiated in
the nib, and created files for the subclass in my project.  I also
hooked the NSDocumentController subclass instance up to the File's
Owner as its delegate.

With only this done, i ran the app and noticed that the menu items
were not enabled.  For instance, the "New" menu item was not enabled.
I also checked and made sure the "New" menu item was targeted at the
First responder with the newDocument: action.  Since the subclass
inherits the method newDocument: from its parent class
NSDocumentController, shouldn't the menu item be validated because the
subclass instance is in the Responder chain as the NSApp's delegate?

I also added a newDocument method to the header and implementation
file and still no menu validation.  I am missing something here. Any
ideas?
 _______________________________________________
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

  • Follow-Ups:
    • Re: NSDocumentController Subclass Response
      • From: Seth Willits <email@hidden>
  • Prev by Date: Printing Problem (Was: Re: Generating PDFs....)
  • Next by Date: Re: NSDocumentController Subclass Response
  • Previous by thread: Re: subclass of NSSlider won't call action method
  • Next by thread: Re: NSDocumentController Subclass Response
  • Index(es):
    • Date
    • Thread