On 10/12/2009, at 3:50 PM, Martin Cote wrote:

> 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.
> 
> Here's more details about the application:
> - I use tracking rects (using NSView's
> addTrackingRect:owner:userData:assumeInside: method).  I'm not using
> NSTrackingArea because I want this thing to work on pre-Leopard
> machines.
> - The mouseEntered:/mouseExited: methods are called properly for the
> tracking rects.
> - My NSCell's are copied for tracking (inspired by the PhotoSearch
> sample project).  In fact, the whole application resemble the
> PhotoSearch project, the main difference being that I use tracking
> rects instead of tracking areas.
> 
> I'm really perplexed by this.  Any insight would be useful.


Not really enough to go on. Just this morning I was debugging some custom cell 
code that lives inside a NSOutlineView and this method was indeed called as 
expected.

Are you expecting this method to be invoked by your tracking handler? Normally 
it's called by a mouseDown in the table.

You need to show some code.

--Graham



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to