• 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
NSBeginAlertSheet question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSBeginAlertSheet question


  • Subject: NSBeginAlertSheet question
  • From: Bill Cheeseman <email@hidden>
  • Date: Thu, 28 Jun 2001 08:29:07 -0400

The third parameter to the NSBeginAlertSheet() function, in NSPanel, is
alternateButton, and the fourth parameter is otherButton. To make a sheet
work correctly, so that the Cancel button is located immediately to the left
of the default button and a third button is located to the left of the
Cancel button, I have to define otherButton as the Cancel button and
alternateButton as the third button. This is in accord with accepted
terminology, as I understand it (confirmed at page 103 of the current Aqua
HI Guidelines, which refers to the third button in an alert as an
"alternate" button).

So why does NSPanel define NSAlertAlternateReturn as 0, and also define
NSCancelButton as 0? I would have expected NSCancelButton to be equivalent
to NSAlertOtherReturn, not NSAlertAlternateReturn, since the otherButton
parameter to NSBeginAlertSheet() is the Cancel button.

Is this just an historical anomaly? Are the NSOKButton and NSCancelButton
enumeration constants simply not supposed to be used with
NSBeginAlertSheet(), and never mind the potential for confusion?

--

Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA

The AppleScript Sourcebook - www.AppleScriptSourcebook.com
Vermont Recipes - www.stepwise.com/Articles/VermontRecipes


  • Follow-Ups:
    • Re: NSBeginAlertSheet question
      • From: kristin <email@hidden>
  • Prev by Date: Custom drawing and cacheing
  • Next by Date: Re: AppKit source available as reference?
  • Previous by thread: Re: Custom drawing and cacheing
  • Next by thread: Re: NSBeginAlertSheet question
  • Index(es):
    • Date
    • Thread