Re: NSWindow
Re: NSWindow
- Subject: Re: NSWindow
- From: Daryn <email@hidden>
- Date: Sat, 18 Jan 2003 21:11:40 -0600
Take a look at the full list of delegate methods. I'd just the
following changes to earlier suggested code:
- (BOOL)windowShouldClose:(NSNotification *)notification
{
NSWindow *windowAboutToClose = [notification object];
BOOL shouldClose = YES;
if (windowAboutToClose == myWindow)
[NSApp beginSheet:mySavePanel modalForWindow:myWindow
modalDelegate:self didEndSelector:@selector(sheetDidEnd:)
contextInfo:myWindow
];
shouldClose = NO;
}
return shouldClose;
}
- (void)sheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode
contextInfo:(void *)contextInfo
{
// handle the return somehow
[(NSWindow *)contextInfo close];
}
On Saturday, January 18, 2003, at 03:29 PM, Matis Schotte wrote:
hi,
another problem: when i close the window, the dialog appears, but the
windows disappears then with the dialog ... what should i do??
thx @ all helpers .. :)
smat _______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
Daryn
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
References: | |
| >Re: NSWindow (From: Matis Schotte <email@hidden>) |