Re: Good mouse tracking design for dynamic view?
Re: Good mouse tracking design for dynamic view?
- Subject: Re: Good mouse tracking design for dynamic view?
- From: Douglas Davidson <email@hidden>
- Date: Thu, 26 Jun 2008 11:56:44 -0700
On Jun 26, 2008, at 11:20 AM, Nathan Vander Wilt wrote:
So it seems I need to do more bookwork myself, but I'm wondering
which direction others would recommend:
a) Set up a single tracking area for the whole view, and perform all
my own hit testing every time the mouse moves.
b) Keep the per-item tracking areas, but perform my own testing in
the edge cases when active (mouse has entered but not exited)
tracking areas are getting reset.
Even though it seems like I'd be reimplementing something Cocoa
already offers, I'm leaning towards option A: I'm not sure if I'll
be able to foresee all the edge cases, and I'd be reinventing half
the hit testing code there anyway.
Does it sound reasonable from a maintenance and performance
perspective to handle the mouse on my own inside my view? It seems
like the tracking Cocoa provides is designed for more static
content, or am I just missing the intended "Option C" recipe for my
scenario?
If your hit testing is not too time-consuming, it is quite possible to
do it on every mouse move. Individual tracking areas are convenient
if you don't have your own hit-testing mechanism set up, but if you
are able to do it efficiently yourself, you certainly may do so.
Douglas Davidson
_______________________________________________
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