Re: Problems with NSTabView and Key chain after adding and removing Tabs
Re: Problems with NSTabView and Key chain after adding and removing Tabs
- Subject: Re: Problems with NSTabView and Key chain after adding and removing Tabs
- From: Pontus Hulin <email@hidden>
- Date: Tue, 07 Aug 2007 08:51:24 +0200
Hello Again
I have found a "quick and dirty" way to solve my problem. I have "short
surcuit" Tab the key chain by using a button.
I place a button in my window with no name, no border and move it out of
"harms way"
I gave it a Tab key equivalent, and in my target outlet, I swich focus
my self by using:
if ([tWindow firstResponder] == control1) {
[tWindow makeFirstResponder:control2];
return;
}
if ([tWindow firstResponder] == control2) {
[tWindow makeFirstResponder:control3];
return;
}
if ([tWindow firstResponder] == control3) {
[tWindow makeFirstResponder:control4];
return;
}
if ([tWindow firstResponder] == control4) {
[tWindow makeFirstResponder:control1];
return;
}
[tWindow makeFirstResponder:control1];
Yes, I know, It ugly but it works.....
Pontus Hulin skrev:
Hello List
Im using XCode 2.4.1 on an Intel mac developing for 10.3.x
Im have some trouble with the tab key chain after programatically
adding tabs to a NSTabView item.
I add and remove tabs from my NSTabView using:
// add
NSTabViewItem *item = [[NSTabViewItem alloc] init];
[item setLabel:newtitle];
[item setIdentifier:key];
[myListController insertTabViewItem:item atIndex:0];
// remove
while ([myListController numberOfTabViewItems] > 1) {
[myListController removeTabViewItem:[myListController
tabViewItemAtIndex:0]];
}
My probles is thatt navigating trough the controls in my window get
messed up. If I navigate using the tab key, it works just fine the
first lap, but after i get to the NSTabView and and one of my added
NSTabViewItem gets focus, after that the tab key chain seems to be
totaly messed up, and I have to click on a control to get back on track.
This does not happen if I select a tab that is put in the list using
Interface builder and is never removed.
I would like to move to 10.4 and use
- setAutorecalculatesKeyViewLoop:TRUE
on my window but the customer still have to support macs running 10.3.x.
Has anyone else experienced this problem and is there a solution?
Best regards
/ Pontus
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden