Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSButton Behaviors



On Sep 28, 2007, at 9:05 PM, Frank D. Engel, Jr. wrote:

HOWEVER, I also need a bound variable (or some similar notification method back to the program) to be set based on whether or not the button is highlighted -- like a "Toggle" button -- rather than just triggering an action on button release.


How about taking a look at the NSButtonCell that belongs to the button? An NSCell (or its subclass, such as NSButtonCell) already has an -isHighlighted method. You can always subclass and extend ...


http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSCell_Class/Reference/Reference.html

If what you're trying to do seems incredibly difficult, you're probably doing it wrong. ;-)

--
I.S.



_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >NSButton Behaviors (From: "Frank D. Engel, Jr." <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.