• 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: Strange toolbar/view/resize cursor interaction
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strange toolbar/view/resize cursor interaction


  • Subject: Re: Strange toolbar/view/resize cursor interaction
  • From: Eric Shepherd <email@hidden>
  • Date: Mon, 21 Apr 2014 19:46:29 -0400

I'm doing this:

- (void)mouseMoved:(NSEvent *)theEvent {
  NSPoint where = [theEvent locationInWindow];
  where = [self convertPoint:where fromView:nil];   // Convert to the
view's frame of reference

  NSLog(@"Mouse Y: %3.0f", where.y);
}

And the results are as described previously. This is the means that Apple
docs said to use to convert the window coordinates to view coordinates...
am I missing something?

Eric Shepherd
Gmail: email@hidden
Twitter: sheppy


On Mon, Apr 21, 2014 at 7:05 PM, Quincey Morris <
email@hidden> wrote:

> On Apr 21, 2014, at 15:23 , Eric Shepherd <email@hidden> wrote:
>
> I added code to dump the Y-coordinate of my mouse while I move it around
> in the NSOpenGLView, and sure enough, it's reaching the value that should
> be the bottom edge well above the bottom.
>
>
> Are you sure you’re using the correct coordinate conversions? Based on
> what Graham said, there are actually 3 coordinate systems involved — the
> content view coordinates, the content (i.e. non-frame) coordinates, and the
> frame coordinates. Officially AFAIK there are only 2 coordinates systems
> (frame and content). If you’re accidentally mixing coordinate systems,
> perhaps you don’t need to adjust the calculations, but just use a different
> conversion?
>
>
_______________________________________________

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: Strange toolbar/view/resize cursor interaction
      • From: Quincey Morris <email@hidden>
References: 
 >Strange toolbar/view/resize cursor interaction (From: Eric Shepherd <email@hidden>)
 >Re: Strange toolbar/view/resize cursor interaction (From: Eric Shepherd <email@hidden>)
 >Re: Strange toolbar/view/resize cursor interaction (From: Ken Thomases <email@hidden>)
 >Re: Strange toolbar/view/resize cursor interaction (From: Eric Shepherd <email@hidden>)
 >Re: Strange toolbar/view/resize cursor interaction (From: Ken Thomases <email@hidden>)
 >Re: Strange toolbar/view/resize cursor interaction (From: Eric Shepherd <email@hidden>)
 >Re: Strange toolbar/view/resize cursor interaction (From: Quincey Morris <email@hidden>)
 >Re: Strange toolbar/view/resize cursor interaction (From: Graham Cox <email@hidden>)
 >Re: Strange toolbar/view/resize cursor interaction (From: Quincey Morris <email@hidden>)
 >Re: Strange toolbar/view/resize cursor interaction (From: Eric Shepherd <email@hidden>)
 >Re: Strange toolbar/view/resize cursor interaction (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: NSOperation Issues
  • Next by Date: Re: Strange toolbar/view/resize cursor interaction
  • Previous by thread: Re: Strange toolbar/view/resize cursor interaction
  • Next by thread: Re: Strange toolbar/view/resize cursor interaction
  • Index(es):
    • Date
    • Thread