Re: NSMomentaryLightButton vs. NSMomentaryPushInButton and NSPushOnPushOffButton vs. NSOnOffButton
Re: NSMomentaryLightButton vs. NSMomentaryPushInButton and NSPushOnPushOffButton vs. NSOnOffButton
- Subject: Re: NSMomentaryLightButton vs. NSMomentaryPushInButton and NSPushOnPushOffButton vs. NSOnOffButton
- From: Quincey Morris <email@hidden>
- Date: Wed, 27 Oct 2010 21:13:25 -0700
On Oct 27, 2010, at 20:04, Jeff Johnson wrote:
> I was aware of the documentation, and you appear to have it backwards:
>
> NSMomentaryLightButton
> While the button is held down it’s shown as “lit,” and also “pushed in” to the screen if the button is bordered.
>
> NSMomentaryPushInButton
> While the button is held down it’s shown as “lit.”
>
> Nonetheless, one would expect that NSMomentaryPushInButton would also be pushed in, given its name. And as I said, there seems to be no difference in behavior.
You're right, I read it according my expectation, not according to the actual words. :)
This is very strange, though. According to this document, NSMomentaryPushInButton is the behavior of a normal push-button, and we know it *is* shown as pushed-in (for at least some of the bordered button types). Also, here's what the Leopard release notes had to say about it:
> The constants NSMomentaryPushButton and NSMomentaryLight where reversed. If you called [NSButtonCell setButtonType:] with these constants, they would do the wrong thing. For compatability, these constant names have been kept but new ones with the correct naming have been introduced: NSMomentaryLightButton and NSMomentaryPushInButton.
After playing around with IB's simulator for a bit, I couldn't find a case where the two non-deprecated constants made any visual difference, either -- regardless of the presence of a template image. I have a vague recollection of finding a difference between them, in the past, but it's possible that I'm just remembering reading the documentation and believing what it said.
It's possible that there's technically a difference between the two types, but that no bezel formats currently show the difference visually.
Very strange.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden