| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
From: Dan Wood <email@hidden>_______________________________________________
Date: Sat Dec 28, 2002 2:30:26 PM US/Pacific
To: Cocoa dev <email@hidden>
Subject: Best way to get different events for a button mouseDown and mouseUp?
I have a need for some buttons that need to notify my code on both the "mouse down" AND the "mouse up". It looks like one way to do this is to make a subclass of NSButtonCell and override startTrackingAt:inView: and stopTracking:at:inView:mouseIsUp:, and also subclass NSButton and call setCellClass: to associate my button cell class with the button. Then I'd store selectors that the button cell would invoke, and hook up a pseudo "action" for mouse up and mouse down.
Is this the preferred way to do this? It seems like there ought to be something simpler, but I don't see it.....
--
Dan Wood
Karelia Software, LLC
email@hidden
http://www.karelia.com/
Watson for Mac OS X: http://www.karelia.com/watson/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
| References: | |
| >Best way to get different events for a button mouseDown and mouseUp? (From: Dan Wood <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
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.