Re: NSCell's mouse tracking method never called
Re: NSCell's mouse tracking method never called
- Subject: Re: NSCell's mouse tracking method never called
- From: Martin Cote <email@hidden>
- Date: Thu, 10 Dec 2009 23:09:21 -0500
On Wed, Dec 9, 2009 at 11:50 PM, Martin Cote <email@hidden> wrote:
> Hello,
>
> I'm trying to track the mouse in my custom NSCell subclass, which is
> used to display the content of a NSTableView. For that matter, I
> override the following method:
>
> - (BOOL)trackMouse:(NSEvent *)theEvent inRect:(NSRect)cellFrame
> ofView:(NSView *)controlView untilMouseUp:(BOOL)flag;
>
> The problem is that this method is never called for some reason that eludes me.
I found what the problem was. The hitTestForEvent:inRect:ofView:
method had to be overridden to return NSCellHitTrackableArea.
Problem solved.
Martin Cote
_______________________________________________
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