• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSScrollView and NSTrackingArea woes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSScrollView and NSTrackingArea woes


  • Subject: Re: NSScrollView and NSTrackingArea woes
  • From: João Varela <email@hidden>
  • Date: Fri, 17 Jul 2015 02:58:53 +0100

On Friday, July 17, 2015, Ken Thomases <email@hidden> wrote:

> On Jul 16, 2015, at 8:19 PM, João Varela <email@hidden
> <javascript:;>> 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.


Passing self.bounds it is the simpler case I am using to test this problem.
Indeed I need to create two tracking areas that do not coincide with the
subview's bounds.

That might make the whole issue go away.  (Or it might not.)
>
> Unfortunately it does not solve that, because I tried that option and the
results are the same.


> Does your implementation of -updateTrackingAreas call through to super?
> The docs say it should.  I notice that your coalescing implementation did
> not.


You are right. I included such call to the super at the beginning or at the
end, and yes the same problem remains.


> > 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.


Hmm, that I haven't tried. If that works you'll be my hero.

>
> Regards,
> Ken
>

Thanks, João
_______________________________________________

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


  • Follow-Ups:
    • Re: NSScrollView and NSTrackingArea woes
      • From: email@hidden
References: 
 >NSScrollView and NSTrackingArea woes (From: João Varela <email@hidden>)
 >Re: NSScrollView and NSTrackingArea woes (From: Quincey Morris <email@hidden>)
 >Re: NSScrollView and NSTrackingArea woes (From: João Varela <email@hidden>)
 >Re: NSScrollView and NSTrackingArea woes (From: Ken Thomases <email@hidden>)

  • Prev by Date: Re: NSScrollView and NSTrackingArea woes
  • Next by Date: Re: NSScrollView and NSTrackingArea woes
  • Previous by thread: Re: NSScrollView and NSTrackingArea woes
  • Next by thread: Re: NSScrollView and NSTrackingArea woes
  • Index(es):
    • Date
    • Thread