Re: NSDocumentController subclass not instantiated first?
Re: NSDocumentController subclass not instantiated first?
- Subject: Re: NSDocumentController subclass not instantiated first?
- From: Kyle Sluder <email@hidden>
- Date: Sun, 7 Mar 2010 17:10:14 -0800
On Sun, Mar 7, 2010 at 4:09 PM, Keith Blount <email@hidden> wrote:
> Running some test NSLogs, it certainly seems that NSDocumentController’s -initialize method is called before that of my application delegate - although I’m not entirely sure that is telling or not. I’ve been through my code looking for calls to NSDocumentController, trying to find any calls that could conceivably occur before MainMenu.nib gets initiated, but so far I’m stumped.
It's important to make a distinction between +initialize (the class
method which is sent by the runtime the first time a class is sent a
message) and -init (the instance method used to initialize an object).
As Quincy says, set a breakpoint on -sharedDocumentController. If that
doesn't work, you could load your app up in Instruments and use the
Object Graph template to find out where the first NSDocumentController
instance is allocated.
--Kyle Sluder
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden