|Jan 18, 2009, 08:21 PM||#1|
NSScreen giving me nonsensical coordinates
I suppose it wouldn't be a problem, except that my program interacts with AppleScript, which actually gets the proper coordinates. I can't just put a 150 pixel vertical offset (which is, of course, the difference in heights of the monitors), because I want to ultimately produce a real program.
Am I missing something? Is there an alternative to NSScreen? I'm so close to finishing this project, but I can't make any sense out of this.
Last edited by XnavxeMiyyep; Jan 18, 2009 at 09:00 PM. Reason: Accidentally wrote NSView in the title instead ofNSScreen
|Jan 20, 2009, 02:17 PM||#3|
Quartz assumes the origin is in the lower left corner.
Carbon will still assume the origin is in the top left corner, which explains the AppleScript result.
So either work with what Quartz gives you or do some small amount of math on the results to massage them the way you think they should be.
Obama is a true statesman whose experience as a state senator, half-term US Senator & guest lecturer in a Constitutional Law class has fully prepared him to take control of our nuclear arsenal.-Me
|Jan 20, 2009, 03:52 PM||#4|
Ok, thanks guys. That also explains why I thought the visible frame assumed the menubar was at the bottom.
I'm working on a utility called Gridlock that allows you to move and resize windows based on coordinates on a hypothetical grid, and wanted to make it work on multiple screens.
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|General: GPS in Maps, how to copy coordinates||PracticalMac||iOS 6||3||Jun 20, 2014 01:45 PM|
|Random nonsensical capitalization||rbtroj||OS X||3||Apr 4, 2013 11:09 AM|
|GPS Coordinates?||Jalopybox||iPhone and iPod touch Apps||2||Mar 13, 2013 08:28 PM|
|giving up...||Afbar1114||iPhone||6||Dec 2, 2012 08:17 PM|
|I'm NOT giving up.||BlazednSleepy||iMac||27||Jun 11, 2012 02:32 PM|
All times are GMT -5. The time now is 05:37 AM.