Hello everyone,

I am developing some drawing software and needed some assistance. I have a basic view: TSLabel which is just a small plain view that doesn't really do anything - just a rectangle. This rectangle can be dragged and moved around it's superview - TSCanvasView which is a subclass of a TSZoomView.

Here is my code for a mouseDown: event:

NSPoint mouseLoc = [self convertPoint:[theEvent locationInWindow] fromView:nil];
        NSLog(@"Mouse Down at X point: %i", mouseLoc.x);
        NSLog(@"Mouse Down at Y point: %i", mouseLoc.y);

My results are pretty large actually, here is the results:
2009-01-28 02:02:39.548 TestApp[59739:10b] Mouse Down at X point: -2089457256 2009-01-28 02:02:39.549 TestApp[59739:10b] Mouse Down at Y point: -2089602536

I suspect it is because I have the canvas displaying a checkerboard background that checkerboards the TSCanvasView's drawing.

Can anyone tell me why the X, Y coords are so astronomical? And is there any code I should look at. Here are my references:

Sketch.app - Apple Developer Tools / Examples
MySQL Workbench
EFLaceView

Any input, or pointers would be greatly appreciated.

Thanks,
Rick Langschultz
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please 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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to