• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSBeginAlertSheet and contextInfo
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

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

  • Prev by Date: Re: What is the purpose of static typing?
  • Next by Date: Re: [Q] Removing TabView shadows ...
  • Previous by thread: NSBeginAlertSheet and contextInfo
  • Next by thread: Re: NSBeginAlertSheet and contextInfo
  • Index(es):
    • Date
    • Thread