NSBeginAlertSheet question
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