0

I am new to programming for Mac (not iOS but OS X) and so have run into a problem. The template providing a document based application doesn't come with an appDelegate class. Only class provided and used is the NSDocument subclass.

My Problem: Where do I put the - (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender (or equivalent) method I need in order to call a NSAlert? If I place it into my NSDocument subclass, it never gets called.

Thanks for any help.

4

1 回答 1

0

解决了!只需要实现我自己的 AppDelegate 类(但是我​​不知道如何做到这一点。我只是查看了一个测试应用程序(非文档库)它是如何进行的)。

另外,我在这里查看:X-Code Interface Builder Not shows App Delegate Object

于 2014-03-10T19:44:09.767 回答