NSDocumentController Subclass Response
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