アットウィキロゴ

Mac OS X Tips

NSApplication

- (void)beginSheet:(NSWindow *)sheet
   modalForWindow:(NSWindow *)docWindow
   modalDelegate:(id)modalDelegate
   didEndSelector:(SEL)didEndSelector
   contextInfo:(void *)contextInfo;

- (IBAction)beginSheet:(id)sender
{
    [NSApp beginSheet:sheet
     modalForWindow:window
     modalDelegate:self
     didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:)
     contextInfo:nil];
}

- (IBAction)sheetOK:(id)sender
{
    [[NSApp endSheet:sheet returnCode:0];
}

- (void)sheetDidEnd:(NSWindow *)sheet
    returnCode:(int)returnCode
    contextInfo:(void *)contextInfo
{
    [sheet orderOut:self];
}
最終更新:2008年12月22日 13:34