title: How to make NSTableRowView drawBackgroundInRect, based upon trackingAreas, update fast enough on scroll?
body: <p>I'm using a view-based NSTableView with a custom NSTableRowView. I would like to use custom row background drawing via drawBackgroundInRect, based upon mouse location using trackingAreas. The goal is to draw a custom background for the unselected row the mouse is currently hovering over.</p>
  
  <p>This is virtually identical to the <a href="http://developer.apple.com/library/mac/#samplecode/HoverTableDemo/Introduction/Intro.html" rel="nofollow">HoverTableView example</a> from the WWDC 2011 session <em>View Based NSTableView Basic to Advanced</em>. You can see that behavior in action in the <em>Mail, Contacts &amp; Calendars</em> System Preferences Pane in the account types table view on the right.</p>
  
  <p>Unlike the examples, I have thousands of rows in my table view. Everything works as in the examples unless I scroll the table view rapidly (e.g., with a two-finger flick via trackpad). In this case, it seems that updateTrackingAreas is not called fast enough. Rows that scroll under the mouse get highlighted but are never notified that the mouse left their tracking area and therefore remain highlighted. The result is mulitple rows showing the mouse-over highlight and, due to the reuse queue, these will scroll off one end of the table view and reappear on the other (with different data of course) still highlighted as if they are moused-over. Scrolling slowly eliminates the problem; but considering I expect to scroll thousands and thousands of rows, scrolling slowly is not an expected user behavior.</p>
  
  <p>I've tried various combinations of NSTrackingAreaOptions to no avail and am now stumped. Any suggestions on to solve this issue would be appreciated.</p>