cocoa - - (void)mouseDown:(NSEvent *)theEvent not firing -


i have got :

  • myviewcontroller.m
  • myviewcontroller.h
  • myview.xib

in myviewcontroller.m, added following :

- (void)mousedown:(nsevent *)theevent {        nslog(@"mousedown: entered"); } 

when click somewhere on view (myview.xib), never enter mousedown: method... know why ?

thanks lot !!

you need implement mousedown:(nsevent *)theevent method inside class (e.g., myview) inherits nsview (or nsresponder precise). set class of view in xib file class created.

in general, class names start capital letter.


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -