Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How can I subclass NSDocumentController?

subclass
0
Posted

How can I subclass NSDocumentController?

0

There are two ways to subclass NSDocumentController: You can make an instance of your subclass in your application’s main nib file. This instance becomes the shared instance. You can create an instance of your subclass in your application delegate’s applicationWillFinishLaunching: method. The first NSDocumentController object to be created becomes the shared instance. The Application Kit itself creates the shared instance (using the NSDocumentController class) during the “finish launching” phase of application startup. So if you need a subclass instance, you must create it before the Application Kit does.

1

There are two ways to subclass NSDocumentController. You can make an instance of your subclass in your application’s main nib file. This instance will become the shared instance. Or you can create an instance of your subclass in your application’s delegate’s applicationWillFinishLaunching: method. The first NSDocumentController to be created will become the shared instance. The Application Kit itself will create the shared instance (using the NSDocumentController class) during the “finish launching” phase of application startup. So if you need a subclass you must create it before the kit does.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.