• 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: Johan Kool <email@hidden>
  • Date: Wed, 18 Apr 2007 13:21:01 +0200

Mike,

Rick is right, this is not a bug. A view's frame is expressed in the coordinates of it's encompassing view. So if the view is not a direct subview of the window's contentview, you will first have to convert the view's frame to that coordinate space.

In my first mail to you I did that:

NSRect rectInWindow = [sender convertRect:[sender frame] toView:nil];
NSPoint originOnScreen = [[sender window] convertBaseToScreen: rectInWindow.origin];


I took it out in my subsequent mail, because in the case of your sample app the sender's frame should not be converted to the windows coordinates, because it already was a direct subview of it.

Hope this clears it up for you.

Johan

---
  http://www.johankool.nl/



_______________________________________________

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


  • Follow-Ups:
    • Re: A bug with NSWindow's convertBaseToScreen: method ?
      • From: Mike Zornek <email@hidden>
References: 
 >A bug with NSWindow's convertBaseToScreen: method ? (From: Mike Zornek <email@hidden>)
 >Re: A bug with NSWindow's convertBaseToScreen: method ? (From: Ricky Sharp <email@hidden>)

  • Prev by Date: Re: A bug with NSWindow's convertBaseToScreen: method ?
  • Next by Date: Re: NSDocumentController recentDocumentURLs hiding non-file based URLs
  • Previous by thread: Re: A bug with NSWindow's convertBaseToScreen: method ?
  • Next by thread: Re: A bug with NSWindow's convertBaseToScreen: method ?
  • Index(es):
    • Date
    • Thread