Hello,
I want to subclass NSDocumentController, but I could not find the information in Apple document how to subclass.
According to ChatGPT, it can be instantiated by [MyDocumentController sharedDocumentController]; before NSApplicationMain() as the following code. It seems working well in my test environment.
int main(int argc, const char * argv[]) {
[MyDocumentController sharedDocumentController];
NSApplicationMain(argc, argv);
}
But, I am not sure whether it is officially correct to instantiate so early (before calling NSApplicationMain).
Is there any official information what is correct way to instantiate subclass of NSDocumentController?