Re: Getting current mouse position after scroll

2010-12-11 Thread Dave Fernandes
Well, to answer my own question, you get cursorUpdate events when scrolling on Snow Leopard, but apparently not on Leopard. On 2010-12-04, at 2:10 AM, Dave Fernandes wrote: > I'm just playing with this myself, and when using an NSTrackingArea, I find I > get cursorUpdate: events when scrolling.

Re: Getting current mouse position after scroll

2010-12-03 Thread Dave Fernandes
I'm just playing with this myself, and when using an NSTrackingArea, I find I get cursorUpdate: events when scrolling. This event provides the mouse location just like mouseMoved:. Based on the sparse description for cursorUpdate:, however, I can't tell whether I can count on this behavior. Can

Re: Getting current mouse position after scroll

2010-12-02 Thread Rick Mann
On Dec 1, 2010, at 23:53:39, Kyle Sluder wrote: > Listen for bounds change notifications on the clip view (aka the > scroll view's -contentView) instead. That's how scrolling actually > works: the clip view changes its bounds origin and the regular view > drawing machinery takes care of the rest

Re: Getting current mouse position after scroll

2010-12-01 Thread Kyle Sluder
On Wed, Dec 1, 2010 at 8:15 PM, Rick Mann wrote: > > On Dec 1, 2010, at 20:14:09, Kyle Sluder wrote: > >> On Wed, Dec 1, 2010 at 7:19 PM, Rick Mann wrote: >>> Cocoa. >>> >>> I have a view that shows the coordinates of the current mouse location in >>> it. I update this via -mouseMoved: But if th

Re: Getting current mouse position after scroll

2010-12-01 Thread Rick Mann
On Dec 1, 2010, at 20:14:09, Kyle Sluder wrote: > On Wed, Dec 1, 2010 at 7:19 PM, Rick Mann wrote: >> Cocoa. >> >> I have a view that shows the coordinates of the current mouse location in >> it. I update this via -mouseMoved: But if the user scrolls the view with a >> scroll ball, I don't ge

Re: Getting current mouse position after scroll

2010-12-01 Thread Kyle Sluder
On Wed, Dec 1, 2010 at 7:19 PM, Rick Mann wrote: > Cocoa. > > I have a view that shows the coordinates of the current mouse location in it. > I update this via -mouseMoved: But if the user scrolls the view with a scroll > ball, I don't get mouse moved events. > > 1) What's the best way to react

Re: Getting current mouse position after scroll

2010-12-01 Thread Rick Mann
On Dec 1, 2010, at 19:42:44, Graham Cox wrote: > Scrolling might occur for some reason other than an event, such as a timer > when autoscrolling, so listening for a bounds change is probably the right > approach, assuming it is triggered for a scroll. Otherwise you may have to > resort to poll

Re: Getting current mouse position after scroll

2010-12-01 Thread Rick Mann
On Dec 1, 2010, at 19:35:37, Ricky Sharp wrote: > See: > > - (void)scrollWheel:(NSEvent *)theEvent Oh, thanks Ricky. That works well. Took me a while to be sure, because the docs SUCK at explaining what you get in that event. Graham Cox noted some issues, so I'll see what I can get from his s

Re: Getting current mouse position after scroll

2010-12-01 Thread Graham Cox
On 02/12/2010, at 2:19 PM, Rick Mann wrote: > I have a view that shows the coordinates of the current mouse location in it. > I update this via -mouseMoved: But if the user scrolls the view with a scroll > ball, I don't get mouse moved events. > > 1) What's the best way to react to scroll chan

Re: Getting current mouse position after scroll

2010-12-01 Thread Ricky Sharp
On Dec 1, 2010, at 9:19 PM, Rick Mann wrote: > I have a view that shows the coordinates of the current mouse location in it. > I update this via -mouseMoved: But if the user scrolls the view with a scroll > ball, I don't get mouse moved events. > > 1) What's the best way to react to scroll cha

Re: Getting current mouse position after scroll

2010-12-01 Thread Rick Mann
On Dec 1, 2010, at 19:22:01, John Joyce wrote: > If the user is only scrolling, the mouse likely has not moved. > > But let me be the first to ask, > What are you really trying to do? I thought that would be obvious from my post. I update a label showing the mouse coordinates. This is relativ

Re: Getting current mouse position after scroll

2010-12-01 Thread John Joyce
On Dec 2, 2010, at 12:19 PM, Rick Mann wrote: > Cocoa. > > I have a view that shows the coordinates of the current mouse location in it. > I update this via -mouseMoved: But if the user scrolls the view with a scroll > ball, I don't get mouse moved events. > > 1) What's the best way to react

Getting current mouse position after scroll

2010-12-01 Thread Rick Mann
Cocoa. I have a view that shows the coordinates of the current mouse location in it. I update this via -mouseMoved: But if the user scrolls the view with a scroll ball, I don't get mouse moved events. 1) What's the best way to react to scroll changes? I'm currently observing the NSViewBoundsDi