Re: Mouse Input...
Re: Mouse Input...
- Subject: Re: Mouse Input...
- From: Daniel DeCovnick <email@hidden>
- Date: Thu, 31 Mar 2005 00:07:57 -0500
If it's a parse error, it's more likely you have a missing semicolon or closing brace or bracket or parenthesis shortly above that line.
-Daniel DeCovnick
danhd123 at mac dot com
Softyards Software
http://www.softyards.com
On Mar 30, 2005, at 4:07 PM, Brian O'Brien wrote:
On Mar 30, 2005, at 1:26 PM, Brian O'Brien wrote:
My class is a subclass of NSImageView
At the moment I am able to receive left mouse drag...
However I get no right mouse or scroll wheel input....
I am unsure from the documentation if the wheel input comes with a down event...
I suspect that it is because I have not called <x-tad-bigger>setAcceptsMouseMovedEvents</x-tad-bigger>
- (void)mouseDown:(NSEvent *)theEvent
{
}
- (void)mouseDragged:( NSEvent * )theEvent
{
float dx, dy;
switch ([theEvent type])
{
case NSLeftMouseDragged:
NSLog(@"Left Mouse!");
break;
case NSRightMouseDragged:
NSLog(@"Right Mouse!");
break;
case NSScrollWheel:
NSLog(@"Scroll Wheel");
break;
}
<x-tad-bigger>- (void)rightMouseDown:(</x-tad-bigger><x-tad-bigger>NSEvent</x-tad-bigger><x-tad-bigger> *)</x-tad-bigger>theEvent
Generates a compiler error...
error: parse error before `NSEvent'
My conclusion is that NSImageView doesn't handle right mouse buttons or scroll wheels...
but I could be wrong...
On Mar 30, 2005, at 12:57 PM, Shawn Erickson wrote:
On Mar 30, 2005, at 11:42 AM, Brian O'Brien wrote:
I have a few questions about mouse input:
1) How do you get the mouse wheel?
<http://developer.apple.com/documentation/Cocoa/Conceptual/EventOverview/Concepts/MouseEvents.html>
Link to above also exists in the documentation for NSEvent.
<http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/ObjC_classic/Classes/NSEvent.html>
-Shawn
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden