Re: NSTextView tab out of
Re: NSTextView tab out of
- Subject: Re: NSTextView tab out of
- From: "Marcus S. Zarra" <email@hidden>
- Date: Thu, 2 Mar 2006 16:14:34 -0700
-selectNextKeyView: was the answer, thanks again Nick. BTW returning
YES was the correct answer. Sounds backwards but the docs state if
you return YES then the selector will NOT be called.
On 3/2/06, Nick Zitzmann <email@hidden> wrote:
>
> On Mar 2, 2006, at 3:50 PM, Marcus S. Zarra wrote:
>
> > - (BOOL)textView:(NSTextView *)textView
> > doCommandBySelector:(SEL)commandSelector {
> > if (commandSelector == @selector(insertTab:)) {
> > [[textView window] makeFirstResponder:[textView
> > nextResponder]];
> > return YES;
> > }
> > return NO;
> > }
> >
> > But the end result is that the tab is ignored. What am I missing?
>
> You got the delegate response backwards. YES means the command should
> be done, but you probably don't want it inserting tabs. You should
> probably also use -selectNextKeyView: instead of -makeFirstResponder:
> as well.
>
> Nick Zitzmann
> <http://www.chronosnet.com/>
>
>
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden