Re: Strange toolbar/view/resize cursor interaction
Re: Strange toolbar/view/resize cursor interaction
- Subject: Re: Strange toolbar/view/resize cursor interaction
- From: Eric Shepherd <email@hidden>
- Date: Tue, 22 Apr 2014 20:26:30 -0400
Ah-ha! This was revealing and disclosed the missing link. Turns out that as
expected, the problem was me doing something stupid. In this case, code in
a totally different source file was taking these values, much farther down
the line, and re-scaling them again. I'd forgotten this old code existed,
so it wasn't adapted to the new Cocoa order of things, and was doing it
wrong.
Thanks everyone for letting me bounce this stuff off you (and for a lot of
good insights into debugging this kind of code).
Eric Shepherd
Gmail: email@hidden
Twitter: sheppy
On Tue, Apr 22, 2014 at 6:53 PM, Quincey Morris <
email@hidden> wrote:
> On Apr 22, 2014, at 15:36 , Eric Shepherd <email@hidden> wrote:
>
> When the cursor is at the top edge of my window, the Y value is off by 10
> pixels.
>
> When the cursor is at the bottom edge of my window, the Y value is off by
> 40 pixels.
>
>
> As I suggested previously, this could indicate that your view bounds have
> been inadvertently scaled.
>
> The next thing you must do is log more environmental information. I
> suggest:
>
> — the view’s visibleRect
> — the view’s bounds
> — the view’s frame
> — the window content view’s bounds
> — the window content view’s frame
> — the window’s frame
> — when the cursor is at the top edge of your view, event.locationInWindow
> in window coordinates
> — when the cursor is at the top edge of your view, your ‘where’ variable
> (that is, event.locationInWindow converted to bounds coordinates)
> — when the cursor is at the bottom edge of your view,
> event.locationInWindow in window coordinates
> — when the cursor is at the bottom edge of your view, ‘where’ (bounds
> coordinates)
>
>
>
_______________________________________________
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