Re: Confused about NSTrackingAreas with autoscroll
Re: Confused about NSTrackingAreas with autoscroll
- Subject: Re: Confused about NSTrackingAreas with autoscroll
- From: Luke Evans <email@hidden>
- Date: Wed, 4 Feb 2009 14:55:25 -0800
Well, it's beyond any doubt in my mind now: my view's tracking areas
are not adjusted when I'm performing a drag operation and during this
operation an autoScroll is performed (in response to the user dragging
outside the visible rect of the view/clipView within the local
scrollView).
Calling my own -updateTrackingAreas when I know the autoscroll has
occurred does not help at all - I can see the rectangles being
constructed with the correct locations, but the view still sends
events as if the scroll offsets within the clipView were the same as
when the drag started.
Up until now I was relatively happy with my first real sojourn in the
land of NSTrackingArea - with the possible exception of finding out
that you don't get mouse entered/exited messages when the view scrolls
_under_ the mouse (e.g. use of the scroll wheel on the mouse) - but in
that case you _do_ get officially called to regenerate tracking areas,
so I send my own synthesized events when I generate the new tracking
area rectangles.
The situation when in a mouse dragging loop is much more serious
though. The eventing concerning tracking area boundaries is totally
unreliable, seeing as the view seems to be stuck with the tracking
states as they were when the drag started. The mouse dragged messages
arrive reliably, and one can perform _immediate_ hit testing on
objects for which the tracking areas were intended, but now my view
has to know to ignore the dodgy mouseEntered/Exited events which
entails having some 'in drag' state distastefully pushed into the view
object from the drag loop. Oh well.
I knew I should have stuck with good old fashioned on-the-fly hit
testing in the entire view, rather than using these new-fangled
tracking area appliances ;-)
_______________________________________________
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