• 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: A bug with NSWindow's convertBaseToScreen: method ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Re: A bug with NSWindow's convertBaseToScreen: method ? (From: Johan Kool <email@hidden>)

  • Prev by Date: Window variants
  • Next by Date: Multiple NSWindows.
  • Previous by thread: Re: A bug with NSWindow's convertBaseToScreen: method ?
  • Next by thread: Core Data & Bindings: Non-string types in an NSTableView
  • Index(es):
    • Date
    • Thread