Confused about NSTrackingAreas with autoscroll
Confused about NSTrackingAreas with autoscroll
- Subject: Confused about NSTrackingAreas with autoscroll
- From: Luke Evans <email@hidden>
- Date: Mon, 2 Feb 2009 17:42:17 -0800
I have an overridden -updateTrackingAreas to compute some tracking
areas in a table view. This is being called when I move the vertical
scroll bar, but I have an event loop to handle drag operations in
which I start NSPeriodic events and call -autoScroll on the view when
the use drags outside the visible rectangle of the table. When this
happens, I recompute my tracking areas (because a new row is probably
visible).
The odd thing is that when the mouse just returns to the visible table
view (still in the drag operation), say from dragging off the bottom
of the visible table area, the tracking area for prior last visible
row is activated (in its old location, even though this rectangle in
table view coordinates is now scrolled higher up in the viewport).
This behaviour is as if the table view (or something) isn't taking the
scroll view offset of the table coords into consideration (while the
mouse is down and I'm running my own event loop). Certainly
everything seems to work when I'm not dragging (i.e. using the scroll
bar then mousing over the tracking areas).
Is it possible that some extra events have to be manually requested/
dispatched while I'm in my drag event loop in order to allow an -
autoscroll: (or for that matter a -scrollRectToVisible:) to work
properly?
Cheers
-- Lwe
_______________________________________________
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