Re: NSBeginAlertSheet and contextInfo
Re: NSBeginAlertSheet and contextInfo
- Subject: Re: NSBeginAlertSheet and contextInfo
- From: "John C. Randolph" <email@hidden>
- Date: Thu, 25 Jul 2002 17:05:23 -0700
On Thursday, July 25, 2002, at 12:27 AM, Famille GOUREAU-SUIGNARD wrote:
Hi,
I can't manage to retrieve my contectInfo field in my
- (void) restoreDefaultsSheetDidEnd:(NSWindow *)sheet
returnCode:(int)returnCode contextInfo:(void *)contextInfo;
I send a NSString* in it when calling the sheet :
NSBeginAlertSheet(@"Rifirence inconnue !", @"Oui",
@"Annuler",nil, [cnxTiroir parentWindow], [[cnxTiroir parentWindow]
delegate], nil,
@selector(restoreDefaultsSheetDidEnd:returnCode:contextInfo:),
[NSString stringWithFormat:@"%@%@",[cnxAfficTrigramme
stringValue],[cnxEditReference stringValue]],
message) ;
does anibody have any hint on this ?
You're putting an autoreleased string into your contextInfo. It's
probably getting destroyed before your sheetDidEnd method.
This should actually be crashing the app. I'm not sure why it isn't.
-jcr
John C. Randolph <email@hidden> (408) 974-8819
Sr. Cocoa Software Engineer,
Apple Worldwide Developer Relations
http://developer.apple.com/cocoa/index.html
John C. Randolph <email@hidden> (408) 974-8819
Sr. Cocoa Software Engineer,
Apple Worldwide Developer Relations
http://developer.apple.com/cocoa/index.html
_______________________________________________
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.