1
我加载纸张到我的主要的.xib,薄片是面板和我没有问题,显示板或关闭,但是当我关闭它我得到一个错误信息:可可beginSheet:didEndSelector抛出一个错误
2012-02-21 11:10:12.142 CollectionTest2[23277:10b] *** -
[AppController customSheetDidClose:returnCode:contextInfo:]: unrecognized selector sent to instance 0x359c00
这里是我的代码:
/*Sheet Methods*/
- (void)showCustomSheet: (NSWindow *)window {
[NSApp beginSheet: panFilenameEditor modalForWindow: window modalDelegate: self didEndSelector: @selector(customSheetDidClose:returnCode:contextInfo:) contextInfo: nil];
}
- (IBAction)closeCustomSheet:(id)sender {
[panFilenameEditor orderOut:self];
[NSApp endSheet:panFilenameEditor];
}
- (void) customSheetDidClose {
NSLog(@"sheet did close");
}
@DD - 谢谢,我只是在看文档再次不理解,但你的解释是有道理的。应用程序现在工作正常。 – PruitIgoe 2012-02-21 17:14:29