Re: Setting up the nextKeyView programmatically
Re: Setting up the nextKeyView programmatically
- Subject: Re: Setting up the nextKeyView programmatically
- From: Jan David Frölich <email@hidden>
- Date: Wed, 5 Sep 2007 00:44:14 +0200
hi fritz,
thanks for your answer!!!
I had tried "setNextKeyView" before, but now I figured out what I had
done wrong and it works like this:
NSEnumerator* enumerator;
NSView* subview;
NSView* lastSubview = nil;
enumerator = [[[mainWindow contentView] subviews] objectEnumerator];
while( subview = [enumerator nextObject] )
{
if ([subview isKindOfClass:[NSClipView class]]) {
if(lastSubview){
[[[subview subviews] objectAtIndex:0] seKeyView:[[lastSubview
subviews] objectAtIndex:0]];
}
lastSubview = subview;
}
}
it still needs a little tweaking (jumping back from the last field to
the first...) but this saves my day already....
regards,
jan
On Sep 4, 2007, at 4:28 PM, Jan David Frölich wrote:
[H]ow do I set up the nextKeyView-order of a couple of
NSTextFields programmatically, when each NSTextField is located
inside its own NSClipView?
...
I want to make sure that tabbing between the Fields works as usual.
Searching the web and the archives wasn't sucessful for the last
days, so I hope somebody can help me here...
You don't say whether you tried the setNextKeyView: method, and
what the result was.
— F
_______________________________________________
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