Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSDocumentController Subclass Response



Gotcha, I should just be happy with that I am too paranoid!  I know
this stuff going on in the background will haunt me later.  Heres some
more info I came up with:

> > Is the behavior I am expecting specific to
> > "Document-based applications"?
> 
> Most likely not.

You are right, it is not specific to "Document-based Apps", but for
some reason if NSDocumentController is subclassed and connected as
File's Owner's delegate, this behavior of menu validation does not
occur.  I expected it to occur inherently due to the fact that the
subclass inherits the newDocument: method.  Even when I add the
newDocument: method to the imp. and header files, menu validation
still does not occur.  If I use a subclass of NSObject in the same
manner, menu validation does occur!!  So the menu validation process
does not like the subclassing of NSDocumentController in a "cocoa
application" project.  Why it should care that it is a NSDocCont
subclass, I don't know!  It responds to the method (by inheritance and
by my manual insertion of the method), shouldn't that be enough?? 
Thats what i have experimentally narrowed it down to, but I still am
not sure why the NSDocumentController subclass is not validating the
"New" menu item.  I am obviously not understanding the inner workings
of a "document-based app" and will probably now just create all my own
document methods in my nsobject subclass.  My whole point of
subclassing NSDocController was b/c I thought it would handle and
recognize menu and document methods more readily.  How would I use
NSDocumentController or a subclass thereof in this case?
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden

References: 
 >NSDocumentController Subclass Response (From: Ronnie O <email@hidden>)
 >Re: NSDocumentController Subclass Response (From: Seth Willits <email@hidden>)
 >Re: NSDocumentController Subclass Response (From: Ronnie O <email@hidden>)
 >Re: NSDocumentController Subclass Response (From: Seth Willits <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.