title: Custom NSCursor for ToolbarItem
body: <p>After reading several questions on the subject here, I have successfully used "custom" cursors for textfields (labels), window contentViews, and buttons using a couple of approaches but I can't make either work for a toolbarItem. Here's the current code:</p>
  
  <p>CustomToolbarItem.h:</p>
  
  <pre><code>#import &lt;Cocoa/Cocoa.h&gt;
  
  @interface CustomToolbarItem : NSToolbarItem
  
  @end
  </code></pre>
  
  <p>CustomToolbarItem.m:</p>
  
  <pre><code>#import "CustomToolbarItem.h"
  
  @implementation CustomToolbarItem
  
  
  
  - (void) awakeFromNib {
      // setup trackingarea for cursor control (mouseEntered/mouseExited)
      NSTrackingArea *trackingArea= [[NSTrackingArea alloc]
                                     initWithRect:self.view.bounds
                                     options: (NSTrackingInVisibleRect |
                                               NSTrackingMouseEnteredAndExited |
                                               NSTrackingActiveAlways)
                                     owner:self
                                     userInfo:nil];
      [self.view addTrackingArea:trackingArea];
  }
  
  - (void)mouseEntered:(NSEvent *)theEvent {
      [[NSCursor pointingHandCursor] push];
  }
  
  
  - (void)mouseExited:(NSEvent *)theEvent {
      [[NSCursor pointingHandCursor] pop];
  }
  
  @end
  </code></pre>
  
  <p>I've also tried setting <code>owner:</code> to <code>self.view</code>, but no joy.</p>
  
  <p>The alternate approach that works  for textfields, buttons, etc. that support the drawRect method:</p>
  
  <pre><code>- (void)drawRect:(NSRect)dirtyRect {
      [super drawRect:dirtyRect];
  }
  
  - (void)resetCursorRects {
      [self addCursorRect:self.bounds
                   cursor:NSCursor.pointingHandCursor];
  }
  </code></pre>
  
  <p>I can't directly modify/address the ToolbarItem's view in XCode's interface builder so I'm stumbling in the dark here.</p>
  
  <p>Any help would be greatly appreciated.</p>
  
  <p>Thanks</p>