• 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 rects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tracking rects


  • Subject: Re: Tracking rects
  • From: "John C. Randolph" <email@hidden>
  • Date: Sat, 5 Nov 2005 06:53:10 -0800


On Nov 3, 2005, at 2:00 AM, Tristan Leblanc wrote:

1: Are tracking rects installed in a view are released when disposing of it ?

Actually, they're kept by the window, not the view, even though - addTrackingRect: is an NSView method. You should keep a list of the tracking rect tags, and remove them yourself with - removeTrackingRect: in your -dealloc method, and if you're moving your view around in the heirarchy, you should take care to clean up any stale ones in -viewWillMoveToSuperview:


If the whole window is going away, you don't need to bother removing your tracking rects.

2: Why can't I track my rects while the mouse is down???

Because in that case, your app is getting mouseDragged events, not mouseMoved events.


-jcr

John C. Randolph <email@hidden> (408) 914-0013
Roaming Cocoa Engineer,
Available for your projects at great Expense and Inconvenience.



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Tracking rects (From: Tristan Leblanc <email@hidden>)

  • Prev by Date: Re: Cocoa functionality analogous to ValidWindowRect?
  • Next by Date: Re: Making menu bar application's window key
  • Previous by thread: Tracking rects
  • Next by thread: Frameworks
  • Index(es):
    • Date
    • Thread