• 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: NSView mouseDown truncated coordinates
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSView mouseDown truncated coordinates


  • Subject: Re: NSView mouseDown truncated coordinates
  • From: Markus Spoettl <email@hidden>
  • Date: Thu, 23 Feb 2012 23:15:54 +0100

On 23.02.12 21:55, Quincey Morris wrote:
Ah, it's clear now. But I still think your theory is flawed. You can't
assume that the physical act of pressing the mouse button doesn't change
the reading (that is, doesn't possibly move the mouse slightly). I don't
think that the rounding in mouseDown has anything to do with it. All we
know is that currently, the mouse can move during the act of pressing
down without producing a new mouseMoved, whereas previously it didn't
behave like that -- or, not often enough to notice.

I agree, but...

Incidentally, I have some event-related code that's evolved for years
over a series of different apps, and I noticed recently that in its last
evolution a couple of years ago, I apparently arranged for all of the
common events (mouseEntered, mouseExited, mouseMoved, mouseDown,
mouseUp, mouseDragged, keyDown and keyUp) to always call cursorUpdate
before doing whatever else they do. That allowed me to consolidate the
hover-highlight-detection in one place (cursorUpdate), and gave
consistency to the highlighting in cases exactly like the one you're
describing.

I think I do exactly the same thing, unless I missunderstand what cursorUpdate does for you, namely (1) detect which item to highlight, (2) which to lowlight, (3) which to leave alone and (4) do all that. All in a central place.

Mouse movement highlighting must happen when the mouse moves. At that time, only the mouse move coordinates are known. They correspond with what happens on the screen, so highlighting works as expected.

Now a mouse-down comes along with different coordinates. That change in coordinates is not reflected visually on screen (no cursor movement, no highlight changes). It leads to other objects than the one highlighted one being manipulated. Really confusing to the end user.

Regards
Markus

PS: None of your or my replies seem to make it through to the list although both you an I cc the list. Not sure why that is.
--
__________________________________________
Markus Spoettl
_______________________________________________

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: NSView mouseDown truncated coordinates
      • From: Quincey Morris <email@hidden>
References: 
 >Re: NSView mouseDown truncated coordinates (From: Markus Spoettl <email@hidden>)
 >Re: NSView mouseDown truncated coordinates (From: Quincey Morris <email@hidden>)
 >Re: NSView mouseDown truncated coordinates (From: Markus Spoettl <email@hidden>)
 >Re: NSView mouseDown truncated coordinates (From: Quincey Morris <email@hidden>)
 >Re: NSView mouseDown truncated coordinates (From: Markus Spoettl <email@hidden>)
 >Re: NSView mouseDown truncated coordinates (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: Determining user's clock preference on iOS
  • Next by Date: Re: Loading existing NIB file from Cocoa?
  • Previous by thread: Re: NSView mouseDown truncated coordinates
  • Next by thread: Re: NSView mouseDown truncated coordinates
  • Index(es):
    • Date
    • Thread