[英]applicationDidBecomeActive doesn't fire in OSX application
In my app i have the following setup : 在我的应用程序中,我具有以下设置:
// .h
@interface MyDocument : NSPersistentDocument <NSApplicationDelegate>
{
...
}
// .m
@implementation MyDocument
-(void) applicationDidBecomeActive:(NSNotification *)notification
{
...
}
The applicationDidBecomeActive never gets called for some reason. 由于某种原因,从未调用applicationDidBecomeActive。 Does anyone know I'm missing here?!
有人知道我在这里想念吗?
Thanks to Carter's comment, I figured out that in the nib file application delegate is not linked to File's Owner (MyDocument). 感谢卡特的评论,我发现在笔尖文件应用程序委托中没有链接到文件的所有者(MyDocument)。 There fore, linking those two fix the problem!
最重要的是,将这两个链接起来可以解决问题!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.