Re: Intercepting events from a control
Re: Intercepting events from a control
- Subject: Re: Intercepting events from a control
- From: Dave DeLong <email@hidden>
- Date: Tue, 10 Mar 2009 13:52:28 -0600
Subclassing isn't always an option (For example, NSButton is a class
cluster).
I've done something like this for iPhone, where I've embedded the
control in a UIView, then set userInteractionEnabled to NO on the
control, so that the tap events would fall through to the UIView
underneath. The UIView handles the events how it needs to, then
passes the taps back to the control for proper visual behavior.
I'm not sure how that would translate to the Mac, but maybe it helps
you. =)
Cheers,
Dave
On Mar 10, 2009, at 1:47 PM, Kyle Sluder wrote:
On Tue, Mar 10, 2009 at 3:43 PM, David Alter <email@hidden
> wrote:
Is there a way to do this?
Subclass the control and override -mouseDown:, -mouseUp:,
-becomeFirstResponder, and -resignFirstResponder? Seems
straightforward to me.
--Kyle Sluder
_______________________________________________
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
_______________________________________________
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