PDA

View Full Version : Keyboard shortcut vs mouse-click in Cocoa




cazlar
Nov 30, 2004, 06:38 PM
I have an app that I'm making that has an NSView that I draw lines into, and also draw text into (with NSBezierPath). The problem is that I decided to add a keyboard shortcut (via IB) to my "Redraw" button, but when I call the button with the keyboard shortcut (as opposed to clicking with the mouse), the text (but not the lines?) ends up being flipped in the view!

How can the keyboard shortcut end up with a different result than the mouse-click????