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

NSTrackingArea Problem


  • Subject: NSTrackingArea Problem
  • From: Richard Somers <email@hidden>
  • Date: Mon, 15 Mar 2010 16:18:29 -0600

I have a view in a window with a tracking area set up.

- (void)initializeTracking
{
NSRect rect = [self frame];
rect.origin.x = 0.0;
rect.origin.y = 0.0;
_trackingArea = [[NSTrackingArea alloc] initWithRect:rect options:(NSTrackingMouseEnteredAndExited | NSTrackingMouseMoved | NSTrackingActiveWhenFirstResponder | NSTrackingInVisibleRect) owner:self userInfo:nil];
[self addTrackingArea:_trackingArea];
}


There is also a panel.

1. With the mouse inside the view, a keyboard shortcut is entered to bring up the panel.

2. Move the mouse outside the view, and then close the panel (with keyboard shortcut, window close box, or with the menu, it does not matter).

3. Move the mouse back inside the view and mouse moved tracking has stopped. That is the problem. Mouse moved tracking should be active but it is not.

4. Move the mouse outside the view and back in again and now mouse tracking is active again.

Any clues as to why mouse tracking stops on step 3?

--Richard

_______________________________________________

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: NSTrackingArea Problem
      • From: Quincey Morris <email@hidden>
  • Prev by Date: Re: Anything like -[performBlockOnMainThread:]?
  • Next by Date: RE: Private ivars, not marked as IBOutlet, visible in IB
  • Previous by thread: Re: Anything like -[performBlockOnMainThread:]?
  • Next by thread: Re: NSTrackingArea Problem
  • Index(es):
    • Date
    • Thread