• 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: Trouble with mouseMoved and custom views
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trouble with mouseMoved and custom views


  • Subject: Re: Trouble with mouseMoved and custom views
  • From: Christopher Drum <email@hidden>
  • Date: Thu, 23 Dec 2004 13:28:51 -0800

While it is possible they overlapped by a pixel, that did not seem to be the reason for the order of event calls. The rects would have overlapped on both the left and the right, if that was the case. Which still doesn't explain what was happening. Additionally, in another test project, I found that I had to make the tracking rects significantly smaller so that there was a non-tracked gap between rects. Then, that seemed to give the OS a chance to fully exit the current tracking rect before entering a new one. And, that works fine, if one's interface allows for such "approximations" of tracking space. For something like a palette of color swatches, I need them to butt up next to each other, and the pixel area in which the user may click is pretty small already.

------------------------------------------------------------------
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.





On Dec 23, 2004, at 1:10 PM, Ricky Sharp wrote:


On Dec 23, 2004, at 11:18 AM, Christopher Drum wrote:

In a previous posting I had asked for help with mouseEntered and mouseExited on a little color palette I was working on. My problem was the order in which mouseEntered and mouseExited are called changes depending upon the direction I move the mouse. The suggestion was to use mouseMoved instead to track the mouse location within my custom view and highlight color palette swatches using the mouse coordinates. (Originally I had a tracking rect for each individual color palette swatch)

Is it possible that your tracking rects overlapped? That may explain the difference in the order of events if for each two rects, there was an intersection of a 1-pixel wide strip.


Did you also see the problem when moving the mouse up and down?

When computing the tracking rects, try insetting them a bit as a test and see if the problem still exists.
___________________________________________________________
Ricky A. Sharp mailto:email@hidden
Instant Interactive(tm) http://www.instantinteractive.com




_______________________________________________ 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
References: 
 >Trouble with mouseMoved and custom views (From: Christopher Drum <email@hidden>)
 >Re: Trouble with mouseMoved and custom views (From: Ricky Sharp <email@hidden>)

  • Prev by Date: Re: Trouble with mouseMoved and custom views
  • Next by Date: Bundling Framework Problem
  • Previous by thread: Re: Trouble with mouseMoved and custom views
  • Next by thread: scaling down without NSImage while printing
  • Index(es):
    • Date
    • Thread