Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

WhiteRabbit

macrumors newbie
Original poster
Jan 11, 2005
26
0
I can't seem able to get a useful mouse location from NSEvent. I rigged a mouseDown event method to log the mouse coordinates. The method is evoked as expected but the location displayed is unintelligible.
Code:
NSPoint location=[NSEvent mouseLocation];
NSLog(@"{ %d, %d }", location.x, location.y);

The x coordinate is always zero, and the y is a large integer. Mouse movement on x axis changes the "y" number, and y-axis movement has no effect. Also, the "y" number isn't random, in fact it is linear, but one pixel of mouse movement is a few thousand in change.

I can't seem to make any sense of this at all. Does anyone have any ideas?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.