Re: "selector ... is passed a return code and caller specified in contextInfo" ?!?!
Re: "selector ... is passed a return code and caller specified in contextInfo" ?!?!
- Subject: Re: "selector ... is passed a return code and caller specified in contextInfo" ?!?!
- From: Alexander Spohr <email@hidden>
- Date: Wed, 18 Mar 2009 00:55:36 +0100
Am 18.03.2009 um 00:41 schrieb Jerry Krinock:
"The didEndSelector ... is invoked after the modal session has ended
and is passed a return code and caller specified in contextInfo.
didEndSelectorshould have the following signature:
- (void)sheetDidEnd:(NSWindow *)sheet
returnCode:(int)returnCode
contextInfo:(void *)contextInfo ;"
Well, as it says in the feedback form, "This document is missing
information." I guess that contextInfo is a pass-thru. But what in
the world is the returnCode? My didEndSelector always seem to get
-1000.
Someone tell me please the missing information and I'll submit the
feedback.
You need some methods to either accept or decline the sheets result.
These methods tell the NSApp what should be returned. You could even
return your own codes:
- (IBAction)cancelSetup:sender
{
[[NSApplication sharedApplication] endSheet:setupWindow
returnCode:NSRunAbortedResponse];
}
- (IBAction)acceptSetup:sender
{
[[NSApplication sharedApplication] endSheet:setupWindow
returnCode:NSRunStoppedResponse];
}
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden