• 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 rect strangeness in Leopard
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tracking rect strangeness in Leopard


  • Subject: Re: Tracking rect strangeness in Leopard
  • From: James Bucanek <email@hidden>
  • Date: Tue, 15 Jan 2008 15:05:00 -0700

James Bucanek <mailto:email@hidden> wrote (Monday, January 14, 2008 1:52 PM -0700):
I have an application that uses tracking rects extensively to provide
roll-over information and animation. These have stopping working
consistently in Leopard.

When the window is first created it creates tracking rects using
-[NSView addTrackingRect:owner:userData:assumeInside:]. In Leopard I
never get a single mouseEntered/mouseExited message for any of these
tracking rects. No amount of clicking, dragging, scrolling, resizing,
changing focus, or deactivating/activating the application or window
seems to make any difference.

However, if I hide the application or minimize the window, when the
window is made visible again all of the tracking rects start working,
and mouseEntered/mouseExited messsages come pouring in. Note that
these are not new tracking rects; these were the same ones created
earlier that weren't working.

Once they start working I can't get them to stop again. Everything
works just as it did in Tiger not matter what I try. The only way to
reproduce the problem is to close the window and create a new one, at
which point the tracking rects in the new window won't work.

The only confounding issue is that these tracking rects are being
created for a subclass of NSView that lives in a transparent child
window that overlays my document window.

To follow up on my own post, the problem seems to be the fact that the view with the tracking rects is in a child window.


I think I've solved the problem by using the contentView of the parent window as my target for creating the tracking rects (since, conveniently, the messages from a tracking rect can be sent to a different object than the view object the contains them). All I really have to do is translate the tracking rect from the coordinate system of the view in the child window to the coordinate system of the view in parent window.

I'll file a bug.

--
James Bucanek

_______________________________________________

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


References: 
 >Tracking rect strangeness in Leopard (From: James Bucanek <email@hidden>)

  • Prev by Date: Bindings, Popup, NSValueTransformer
  • Next by Date: Quitting Current Application
  • Previous by thread: Tracking rect strangeness in Leopard
  • Next by thread: Core Data performance advice... creating relationships.
  • Index(es):
    • Date
    • Thread