Re: Return key in NSTextView
Re: Return key in NSTextView
- Subject: Re: Return key in NSTextView
- From: Markus Hitter <email@hidden>
- Date: Fri, 28 Sep 2001 13:55:07 +0200
Am Freitag, 28. September 2001 um 02:08 schrieb Dustin Mierau:
Hello again.
What is the best way to be informed when a key has been pressed
in an NSTextView? I obviously want to intercept a key and do
some other action when it is hit, and let all other keys go to
the NSTextView object.
Have a look at this delegate:
- (BOOL)textView:(NSTextView *)view
shouldChangeTextInRange:(NSRange)range
replacementString:(NSString *)replacementString;
Will be called for almost every single character while typing.
Will allow you to intercept pasted text, too.
Markus
- - - - - - - - - - - - - - - - - - -
Dipl. Ing. Markus Hitter
http://www.jump-ing.de/