我正在将工作表加载到我的主 .xib 中,工作表是一个面板,显示或关闭工作表没有问题,但是当我关闭它时,我收到一条错误消息:
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");
}