• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSCell's mouse tracking method never called
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSCell's mouse tracking method never called


  • Subject: Re: NSCell's mouse tracking method never called
  • From: Graham Cox <email@hidden>
  • Date: Thu, 10 Dec 2009 15:59:40 +1100

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 (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

  • Follow-Ups:
    • Re: NSCell's mouse tracking method never called
      • From: Martin Cote <email@hidden>
References: 
 >NSCell's mouse tracking method never called (From: Martin Cote <email@hidden>)

  • Prev by Date: Re: Leopard for development / testing.
  • Next by Date: Re: Leopard for development / testing.
  • Previous by thread: NSCell's mouse tracking method never called
  • Next by thread: Re: NSCell's mouse tracking method never called
  • Index(es):
    • Date
    • Thread