• 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: Setting up the nextKeyView programmatically
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Setting up the nextKeyView programmatically (From: Jan David Frölich <email@hidden>)
 >Re: Setting up the nextKeyView programmatically (From: Fritz Anderson <email@hidden>)

  • Prev by Date: Re: NSButtonCell image leaking? [SOLVED]
  • Next by Date: compiler warning when attempting to save hex value in char in reusing it
  • Previous by thread: Re: Setting up the nextKeyView programmatically
  • Next by thread: Re: NSButtonCell image leaking? [SOLVED]
  • Index(es):
    • Date
    • Thread