Best way to get different events for a button mouseDown and mouseUp?
Best way to get different events for a button mouseDown and mouseUp?
- Subject: Best way to get different events for a button mouseDown and mouseUp?
- From: Dan Wood <email@hidden>
- Date: Sat, 28 Dec 2002 14:30:26 -0800
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.