Re: over-riding the behaviour of the tab key in a NSTextView
Re: over-riding the behaviour of the tab key in a NSTextView
- Subject: Re: over-riding the behaviour of the tab key in a NSTextView
- From: email@hidden
- Date: Tue, 19 Mar 2002 14:49:55 -0800
Is there a way of temporarily changing the behaviour of a certain key in
a NSTextView without sub-classing it? For example, I have written a
program that auto-completes words. After you type three characters it
guesses the word you want and inserts the remaining characters after the
insertion point and highlights them (so you can keep typing if you don't
want to keep the suggestion). However, most implementations of
auto-completion seem to use the tab key as a way of accepting the
suggestion. In my case, as the suggestion is highlighted, pressing the
tab key just replaces it with a tab.
I would recommend reading Doug Davidson's recent posting on macosx-dev
about the textview delegate method textView:doCommandBySelector:. That
list is hosted by omnigroup (www.omnigroup.com). Doug's post was made
on March 18th of this year.
Ben Haller
Stick Software
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.