• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSTextView tab out of
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTextView tab out of


  • Subject: Re: NSTextView tab out of
  • From: "Marcus S. Zarra" <email@hidden>
  • Date: Thu, 2 Mar 2006 15:50:09 -0700

Thanks, I had found that delegate method right after sending out my
call for help.  However, I am being somehwhat dense today and cannot
seem to get the method to actually advance to the next field.  In my
delegate I created the method as follows:

- (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?

On 3/2/06, Nick Zitzmann <email@hidden> wrote:
>
> On Mar 2, 2006, at 3:07 PM, Marcus S. Zarra wrote:
>
> > What would be the best approach to altering an nstextview so that when
> > a tab is pressed while it has focus the tab changes the first
> > responder instead of inserting a tab into the text view?
>
> Implement the delegate method -textView:doCommandBySelector:, watch
> for the -insertTab: selector, and if they're equal, then change the
> key view and return NO. Otherwise, have the method return YES. You
> shouldn't need to subclass or otherwise modify a text view to do
> this, although if you want to disallow line feeds as well, then you
> should be able to put the text view into field editor mode instead.
>
> 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

  • Follow-Ups:
    • Re: NSTextView tab out of
      • From: Nick Zitzmann <email@hidden>
References: 
 >NSTextView tab out of (From: "Marcus S. Zarra" <email@hidden>)
 >Re: NSTextView tab out of (From: Nick Zitzmann <email@hidden>)

  • Prev by Date: Re: NSTextView tab out of
  • Next by Date: Package Bit
  • Previous by thread: Re: NSTextView tab out of
  • Next by thread: Re: NSTextView tab out of
  • Index(es):
    • Date
    • Thread