• 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: returnCode from beginSheetModalForWindow is incorrect?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: returnCode from beginSheetModalForWindow is incorrect?


  • Subject: Re: returnCode from beginSheetModalForWindow is incorrect?
  • From: Jeremy Dronfield <email@hidden>
  • Date: Fri, 18 Mar 2005 14:28:08 +0000


On 18 Mar 2005, at 10:58 am, Geert B. Clemmensen wrote:

Well, you example works as supposed, which you also have demonstrated, BUT if you create the warningAlert like this:

NSAlert* warningAlert = [NSAlert alertWithMessageText:@"Do something with the selected files?"
defaultButton:@"Go Ahead"
alternateButton:@"Cancel"
otherButton:nil
informativeTextWithFormat:@"(You can switch off this warning in Preferences)"];


You get:
2005-03-18 11:53:22.677 XYZ[2421] returnCode:1
2005-03-18 11:53:27.326 XYZ[2421] returnCode:0

I guess the explanation is to be found in this statement in the description for the alertWithMessage: method:
This is a compatibility method. It is designed for easy adoption by applications migrating from the corresponding functional API.

Yes, the explanation is there. It identifies the return codes:

"The return values ... are constants— NSAlertDefaultReturn, NSAlertAlternateReturn, and NSAlertOtherReturn"

These are the return values defined in NSPanel.h, and are the values you've been getting. So, no contradictions in the documentation after all.

Regards,

-Jeremy

============================================
SkoobySoft, home of viJournal and Skooby Renamer
email: email@hidden or visit:
http://freespace.virgin.net/jeremy.dronfield/skoobysoft/skoobysoft.html
============================================

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >returnCode from beginSheetModalForWindow is incorrect? (From: "Geert B. Clemmensen" <email@hidden>)
 >Re: returnCode from beginSheetModalForWindow is incorrect? (From: Jeremy Dronfield <email@hidden>)
 >Re: returnCode from beginSheetModalForWindow is incorrect? (From: Jeremy Dronfield <email@hidden>)
 >Re: returnCode from beginSheetModalForWindow is incorrect? (From: "Geert B. Clemmensen" <email@hidden>)

  • Prev by Date: Re: Need serious help with NSOutlineView
  • Next by Date: Re: dotmac framework wrappers?
  • Previous by thread: Re: returnCode from beginSheetModalForWindow is incorrect?
  • Next by thread: License info
  • Index(es):
    • Date
    • Thread