• 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: why NSTrackingArea doesn't work?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: why NSTrackingArea doesn't work?


  • Subject: Re: why NSTrackingArea doesn't work?
  • From: Conrad Shultz <email@hidden>
  • Date: Wed, 22 Jun 2011 17:41:01 -0700

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 6/22/11 5:04 PM, Nick wrote:
>   NSTrackingArea* trackingArea = [[NSTrackingArea alloc] initWithRect:[self
> frame] options: (NSTrackingMouseEnteredAndExited |   NSTrackingActiveAlways)
> owner:self userInfo:nil];

Don't use [self frame]... that is in the superview's coordinate system,
not the tracking area's view's coordinate space (which is expected).

Use [self bounds] instead; depending on the absolute position of your
view this might make a HUGE difference.

(I reimplemented your code, with a slightly different object structure
[that is, not in a subview but in a view controller] and it worked fine
so long as I corrected the frame/bounds confusion.)

- --
Conrad Shultz

Synthetiq Solutions
www.synthetiqsolutions.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.14 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk4Ci50ACgkQaOlrz5+0JdV7XACfcaI/Ki92koEOQWctxm7yEtua
e98AnRRtz971DquuMJFrU9JKZjkXs7bD
=QGrY
-----END PGP SIGNATURE-----
_______________________________________________

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: why NSTrackingArea doesn't work?
      • From: Ken Thomases <email@hidden>
References: 
 >why NSTrackingArea doesn't work? (From: Nick <email@hidden>)

  • Prev by Date: why NSTrackingArea doesn't work?
  • Next by Date: Re: why NSTrackingArea doesn't work?
  • Previous by thread: why NSTrackingArea doesn't work?
  • Next by thread: Re: why NSTrackingArea doesn't work?
  • Index(es):
    • Date
    • Thread