Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: nextKeyView and NSTabView: How to prevent the tabbing order from going out of the tab view?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: nextKeyView and NSTabView: How to prevent the tabbing order from going out of the tab view?



I just set up a quick test in IB and was able to get it to run
perfectly when I tested the Interface in IB. Here are some tips:

It took me a second how to figure out how to connect the
NSTabViewItem's initialFirstResponder to the first text view I had.
The best (only?) way to do this is by sing the "list view" (I'm not
sure of the exact name). In the window that has all of your
instantiated objects (teh "Instances" tab), click on the button that
is directly over the scrollbar. The top one has for squares, the
bottom one has some bullets and lines. You want the bottom one. From
there, find the window you are dealing with. If you have more than
one, this may be a little difficult, just double click on each of them
until the right one comes up. Click the arrow next to it to expand..
Click the NSView (Content View) arrow. Now find the correct NSTabView
(Tab,View) line and it expand it. You should be seeing a list of all
of your tabs. Expand the first one. Ctrl-click from the
NSTabViewItem to the first control. Connect it to
initialFirstResponder (your only choice). Now, ctrl-click from the
first control to the next (or do it the normal way, it doesn't
matter). Ctrl click from the last control to the first control. In
my case, this was the last NSTextField in the list under NSTabViewItem
to the first one in the list. Note that you can also control drag
between the controls on the window.

Perhaps the problem was the first step since it seems to be impossible
to control drag from an NSTabViewItem to anything else and this is
crucial. Then again, in your email I didn't understand how you
connected the last control to the first. You mentioned something
about the first responder. Just connect it to the control itself.

I did those steps, it took about 2 minutes and it worked perfectly.
If you're still experiencing problems, let me know.

Robbie


On Fri, 29 Oct 2004 23:32:06 +0200, Uli Zappe <email@hidden> wrote:
> Hi,
>
> judging by the messages to this topic, the combination of nextKeyView
> and NSTabView seems to be generally problematic, but I've run into a
> problem I haven't found in the archives so far.
>
> I have an NSWindow with a tabless NSTabView in it and a few buttons
> outside the tab view that control the tab view selection. With full
> keyboard access enabled, I want the tabbing order to stay *inside* the
> tab view, i.e. after tabbing to the last control inside the tab view,
> tabbing should lead to the first control inside the tab view again, and
> *not* go out of the tab view to the buttons outside the tab view.
>
> This seems to be as easy a task as you can get, but it doesn't work.
> I've set the initial first responder inside the tab view, and connected
> all controls inside the tab view with the nextKeyView outlets. The last
> control's nextKeyView points to the first item inside the tab view (the
> first responder) again. Also, for test purposes I mixed up the order of
> the controls so that it is easy to see from the tabbing behavior if my
> tabbing order produced via nextKeyView outlets is used at all (instead
> of a computed tabbing order).
>
> If I test this in Interface Builder (or my app), the tabbing order
> clearly shows that my nextKeyView settings *are* used. *Except* the
> last one: if I have arrived at the last control, tabbing goes outside
> of the tab view, to one of the buttons outside, thus ignoring my
> nextKeyView setting.
>
> Is there something I miss, or is this a downright bug? If so, does
> anybody know of a work-around?
>
> Thanks in advance for your replies!
>
> Bye
> Uli
> ________________________________________________________
>
> Uli Zappe, Solmsstra├če 5, D-65189 Wiesbaden, Germany
> http://www.ritual.org
> Fon: +49-700-ULIZAPPE
> Fax: +49-700-ZAPPEFAX
> ________________________________________________________
> _______________________________________________
> 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
>
_______________________________________________
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

References: 
 >nextKeyView and NSTabView: How to prevent the tabbing order from going out of the tab view? (From: Uli Zappe <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.