Re: customizing TextView keyboard responses
Re: customizing TextView keyboard responses
- Subject: Re: customizing TextView keyboard responses
- From: Matt Neuburg <email@hidden>
- Date: Wed, 19 Dec 2001 06:05:57 -0800
On Tue, 18 Dec 2001 16:22:56 -0800, Douglas Davidson <email@hidden> said:
>
On Tuesday, December 18, 2001, at 09:04 AM, Matt Neuburg wrote:
>
>
> No, it's more complicated than that, because I want Return characters
>
> to be
>
> entered as usual. I don't want a TextField; I want a TextView with just
>
> this one customized bit of behavior. m.
>
>
This question last came up in the context of distinguishing between
>
enter and return; let me crib from what I said then.
[snip]
>
You should be able to implement the text view delegate method
>
>
- (BOOL)textView:(NSTextView *)aTextView
>
doCommandBySelector:(SEL)aSelector;
>
>
and check whether aSelector == @selector(insertTab:), if you choose not
>
to make your text view a field editor, or whether aSelector ==
>
@selector(insertNewline:), if you choose to make your text view a field
>
editor, and at that point do something other than the default.
This was the clue I needed - thanks very much. m.
--
matt neuburg, phd = email@hidden,
http://www.tidbits.com/matt
pantes gar anthropoi tou eidenai oregontai phusei