• 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: tracking area problems on 10.4.11
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tracking area problems on 10.4.11


  • Subject: Re: tracking area problems on 10.4.11
  • From: "John C. Randolph" <email@hidden>
  • Date: Fri, 04 Jul 2008 21:14:24 -0700


On Jul 2, 2008, at 11:21 AM, Wesley Smith wrote:

I did that.  my window and content view both have those methods
defined.  I've tried setting both of them to owner to no avail :(


From Q&A #1355:

Technical Q&A QA1355
Why aren't my tracking rects working?
Q: I'm trying to implement tracking rectangles so that I can recieve - mouseEntered: and -mouseExited: messages and provide visual feedback to the user. I've sent my view an - addTrackingRect:owner:userData:assumeInside:message, but it seems to have no effect.
A: This symptom usually results from trying to set tracking rectangles before your view has been added to a window.


Although NSView implements the - addTrackingRect:owner:userData:assumeInside: method, the list of tracking rectangles is kept by the window, not the view. When your - initWithFrame: method is executed, your view is not yet associated with any window, so the view can't actually set any tracking rects.

A better place to send your -addTrackingRect:.. messages is in a - viewDidMoveToWindow: or -awakefromNib method.
_______________________________________________


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


References: 
 >tracking area problems on 10.4.11 (From: "Wesley Smith" <email@hidden>)
 >Re: tracking area problems on 10.4.11 (From: Tony Becker <email@hidden>)
 >Re: tracking area problems on 10.4.11 (From: "Wesley Smith" <email@hidden>)
 >Re: tracking area problems on 10.4.11 (From: Tony Becker <email@hidden>)
 >Re: tracking area problems on 10.4.11 (From: "Wesley Smith" <email@hidden>)

  • Prev by Date: Re: How to implement Quartz GL ?
  • Next by Date: Re: IB3 and custom controls: problem with actions
  • Previous by thread: Re: tracking area problems on 10.4.11
  • Next by thread: RE: tracking area problems on 10.4.11
  • Index(es):
    • Date
    • Thread