【发布时间】:2013-07-10 15:26:41
【问题描述】:
我得到了一个对话框而不是工作表。当应用程序不是基于文档时它可以工作。 现在不行了。
- (IBAction) showSheet:(NSWindow*)window
{
// User has asked to see the dialog. Display it.
NSLog(@"%@", self.contragentsSheet);
if (!_contragentsSheet)
[NSBundle loadNibNamed: @"contragentsSheet" owner: self];
[NSApp beginSheet:self.contragentsSheet
modalForWindow: [[NSApp delegate]window]
//modalForWindow: window
modalDelegate: self
didEndSelector: NULL
contextInfo: NULL];
//[contragentSearch becomeFirstResponder];
//NSLog ( @"Sheet is launched");
NSLog(@"%@", [[NSApp delegate]window]);
}
【问题讨论】:
标签: cocoa document-based