Re: A bug with NSWindow's convertBaseToScreen: method ?
Re: A bug with NSWindow's convertBaseToScreen: method ?
- Subject: Re: A bug with NSWindow's convertBaseToScreen: method ?
- From: Mike Zornek <email@hidden>
- Date: Fri, 20 Apr 2007 00:37:11 -0400
On 4/18/07 8:07 AM, "Johan Kool" <email@hidden> wrote:
> Mike,
>
> Ah, I now see where I went "wrong." Not sender, but its superview
> should do the conversion. This should handle all cases:
>
> NSRect rectInWindow = [[sender superview] convertRect:[sender frame]
> toView:nil];
> NSPoint originOnScreen = [[sender window] convertBaseToScreen:
> rectInWindow.origin];
>
> Johan
That seems to work great. Thanks so much for your help.
On 4/18/07 5:32 PM, "Ricky Sharp" <email@hidden> wrote:
> Make sure you test your
> solution with a scaling factor other than 1.0.
Using the above code I tested my 'bug example' at 1.5 and it seemed to work.
Good recommendation. Thanks.
~ Mike
--
Work: http://ClickableBliss.com
Play: http://MikeZornek.com
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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