• 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
Re: NSButton Behaviors
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


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

  • Prev by Date: NSButton Behaviors
  • Next by Date: NSControlTextDidChangeNotification fires only once upon setting delegate
  • Previous by thread: NSButton Behaviors
  • Next by thread: Re: NSButton Behaviors
  • Index(es):
    • Date
    • Thread