Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSBeginAlertSheet and contextInfo



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.

References: 
 >NSBeginAlertSheet and contextInfo (From: Famille GOUREAU-SUIGNARD <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.