|Jan 18, 2009, 09: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 10:00 PM. Reason: Accidentally wrote NSView in the title instead ofNSScreen
|Jan 20, 2009, 03: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, 04: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 02:45 PM|
|Random nonsensical capitalization||rbtroj||OS X||3||Apr 4, 2013 12:09 PM|
|GPS Coordinates?||Jalopybox||iPhone and iPod touch Apps||2||Mar 13, 2013 09:28 PM|
|giving up...||Afbar1114||iPhone||6||Dec 2, 2012 09:17 PM|
|I'm NOT giving up.||BlazednSleepy||iMac||27||Jun 11, 2012 03:32 PM|
All times are GMT -5. The time now is 08:00 PM.