Re: NSScrollView and NSTrackingArea woes
Re: NSScrollView and NSTrackingArea woes
- Subject: Re: NSScrollView and NSTrackingArea woes
- From: Ken Thomases <email@hidden>
- Date: Thu, 16 Jul 2015 20:37:29 -0500
On Jul 16, 2015, at 8:19 PM, João Varela <email@hidden> wrote:
>
> I’m passing [self bounds]. And no, I am not using NSTrackingInVisibleRect
Why aren't you using that? That seems like the most obvious way to get correct behavior. The only reason you wouldn't use it is if you were adding a tracking area that was only for a portion of a view, but you say you're using the view's bounds.
That might make the whole issue go away. (Or it might not.)
Does your implementation of -updateTrackingAreas call through to super? The docs say it should. I notice that your coalescing implementation did not.
> Yes, the tracking area is incorrect and apparently I cannot invoke -updateTrackingAreas myself because it apparently messes up with the NSTrackingArea’s of the subviews and most likely of the clipView, etc.
>
> So I guess this problem could be solved if there were a method to tell the OS that the tracking areas are invalid (and thus they need to be updated). However, apparently there is none, AFAICT. Or is there?
You can't invoke -updateTrackingAreas yourself, but there's nothing preventing you from removing old tracking areas and adding new ones, as appropriate, any time you like. You can put that code in a method of your own which is called by -updateTrackingAreas plus any other time you want.
Regards,
Ken
_______________________________________________
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