NSEvent mouseDown & [NSEvent type] NSRightMouseDown
NSEvent mouseDown & [NSEvent type] NSRightMouseDown
- Subject: NSEvent mouseDown & [NSEvent type] NSRightMouseDown
- From: David Harper <email@hidden>
- Date: Fri, 22 Jun 2007 15:09:51 -0400 (EDT)
Hi,
I've been working on the core (or model) implementation for a small-medium cocoa application for a while, and now that it's complete I'm moving onto the development of the user interface. I created a new project for a document-based cocoa application... Right now the document nib file consists of a window with only a customview in it. I'm trying to get it to respond to mouse clicks. Left mouse clicks work fine, but right mouse clicks do not respond... Any ideas?
here is my method:
- (void)mouseDown:(NSEvent *)theEvent {
switch ([theEvent type]) {
case NSLeftMouseDown:
printf("left mouse down\n");
break;
case NSRightMouseDown:
printf("right mouse down\n");
break;
}
}
also, when i try to extract the (NSPoint *) mouseLocation I get a warning. Is this obtained from a subclass of NSEvent?
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden