• 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
Making efficient use of tracking rects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Making efficient use of tracking rects


  • Subject: Making efficient use of tracking rects
  • From: Christopher Drum <email@hidden>
  • Date: Fri, 4 Mar 2005 16:22:06 -0800

I'm looking through the documentation, and I don't see anything that addresses this question that's nagging me. I can set up tracking rects and I can set up tool tip rects. These things work just fine. But, is it possible to reference one of these rects on something like mouseDown: in an NSView subclass? I'd love to be able to get the userData for the tracking rect that my mouse click intersects. I suppose I could just make up a dictionary to send through the userData that includes the rect and my own information, but it seems so redundant to package up a rect in the userData for that same rect.

I guess what I want to be able to do is, in mouseDown: call [NSTrackingRectIntersectsPoint(NSPoint) userData]. i.e., give me the userData information for the tracking rect which my current mouse down coordinates intersect.

It seems like a lot of redundant information would be useful to package up into the userData, like the tag, the rect, app-specific data, etc. At the same time, it seems difficult to grab some of this info if it isn't immediately put into the userData at the moment of rect creation.

Or do I have this all confused?

------------------------------------------------------------------
Christopher Drum
http://homepage.mac.com/christopherdrum

Check out FileWrangler, my five-star rated (MacUpdate, VersionTracker) Cocoa app written in Objective-C for the batch renaming of files.

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: newbie & calling functions from other classes
  • Next by Date: Re: newbie & calling functions from other classes
  • Previous by thread: Re: newbie & calling functions from other classes
  • Next by thread: Re: Making efficient use of tracking rects
  • Index(es):
    • Date
    • Thread