• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSEvent mouseDown & [NSEvent type] NSRightMouseDown
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: NSEvent mouseDown & [NSEvent type] NSRightMouseDown
      • From: Dave Hayden <email@hidden>
  • Prev by Date: NSTableView default sort column?
  • Next by Date: Re: Distributed Objects or NSFileHandle?
  • Previous by thread: Re: NSTableView default sort column?
  • Next by thread: Re: NSEvent mouseDown & [NSEvent type] NSRightMouseDown
  • Index(es):
    • Date
    • Thread