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