Re: NSButton Behaviors
Subject : Re: NSButton Behaviors
From: "I. Savant" <email@hidden >
Date: Fri, 28 Sep 2007 21:12:24 -0400
Delivered-to: email@hidden
Delivered-to: email@hidden
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:cc:message-id:from:to:in-reply-to:content-type:content-transfer-encoding:mime-version:subject:date:references:x-mailer; bh=op7Gca1gUm9K1UYi43SE1jotf4pq76y/lIEZU5UsXYs=; b=rmAMIEpkbNKFfw26prvbJmkvvI8/UFz95xSyRCA7KbtnMMVQL7yvt48DCMlyGJqN5UPzSOH/JeZu8D3NhiIt9ER1EkkkMjABNQNkNYrUelO7eO/fmA3ZDz0IaIkD5AWR4ZFjObMRQBmS6sJFBQzookACKaNvkGXOhbV2CKBBpXE=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:cc:message-id:from:to:in-reply-to:content-type:content-transfer-encoding:mime-version:subject:date:references:x-mailer; b=OSzZWVXRAPcM9qIlefLHEsV4rgx4GUrBtz/6A7+nwr6+CsM/guc9N+Qs6Rgnl3CnI9Qc4l5jFQ4gpQE8+GTzUz88bYfoJ6D/8bIpB7lz5n82gIzB/lN1RE2jjr1TsYmXxjTK//DJBmUh+EOHWCUCrRgyCQ0vnA/F6Z1w8nTrwWQ=
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
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.