On Jul 24, 2014, at 14:35 , Cody Garvin <c...@servalsoft.com> wrote:

> I think I’ll try your’s and Edward’s suggestion on attempt mouseEntered / 
> mouseMoved with a single tracking area.

From one point of view, I would recommend *not* taking this approach, since it 
comes near to flailing, and that’s never a good way to solve a problem for 
realz.

OTOH, I have to admit that I usually end up taking an overkill approach. That 
is, I implement whatever event method overrides I need (including 
cursorUpdate), then in *all* of them I invoke a method that decides what cursor 
to show. That includes mouseDown, mouseUp and mouseMoved/Dragged if they’re 
overridden. This doesn’t feel quite as smelly as making an end-run around 
cursorUpdate, but that may just be self-justification.

I’d advise you to persevere with debugging the original problem. The most 
informative route is to find out what the conditions for failure are. 
(Coordinate system changes when scrolling occurs? Tracking areas overlapping 
system-defined tracking areas at the borders of the window? Something changing 
the cursor after you set it correctly? One particularly annoying special case 
is that in a scroll view, the clip view monitors the cursor near the edges 
where scroll bars appear, and will set the cursor back to the arrow if you 
venture into the scroll bar. You may need to set the scroll view’s 
“documentCursor” property to get the cursor you expect.)

> Again, I am building on 10.10 for 10.10, so maybe there is something there. 
> It seems like a very straight forward attempt. 

It may of course be a 10.10 issue, but it’s not a good idea to start there. In 
my experience with NSTrackingArea, it’s always your own fault, but it’s always 
very hard to debug.

_______________________________________________

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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

Reply via email to