Re: NSButton Behaviors
Re: NSButton Behaviors
- Subject: Re: NSButton Behaviors
- From: "I. Savant" <email@hidden>
- Date: Fri, 28 Sep 2007 21:12:24 -0400
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:
This email sent to email@hidden