Mouse Events in NSView

Chandhu
Unregistered
 
Post: #1
Hi,

How can we find out and use the mouse events for NSView? I want to draw shapes on the canvas using mouse in my cocoa (using Obj C) application ?

Thanks in advance.....
Quote this message in a reply
Apprentice
Posts: 9
Joined: 2008.01
Post: #2
Set your view as current responder, and subclass NSResponder mouse methods.

I made a little test project:
http://kuon.goyman.com/stuffs/MouseEvents.zip
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Full screen mouse events Mister T 17 8,277 Jan 4, 2010 02:55 PM
Last Post: MacMan
  NSView loaded from bundle won't draw... Joseph Duchesne 1 3,376 Feb 12, 2006 03:33 AM
Last Post: Cochrane
  NSImage and NSView problems Joseph Duchesne 1 3,688 Aug 19, 2005 07:36 AM
Last Post: unknown
  Mouse events for an openGL window majestik666 5 7,250 Jul 5, 2005 06:15 PM
Last Post: majestik666
  Problem With Motion in NSView Nick 16 7,311 Jun 2, 2005 05:56 AM
Last Post: Nick