• 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
Nested NSViews and keyboard focus
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Nested NSViews and keyboard focus


  • Subject: Nested NSViews and keyboard focus
  • From: Nathan Auch <email@hidden>
  • Date: Fri, 21 Dec 2007 10:52:04 -0500

The installer I'm working on has a main window containing a few push buttons and an NSBox. As the user moves through the installer, I use the setContentView method on the NSBox to replace the contents of the box with the view for the current "panel" of the install. These panels are really just grouping of other standard controls and are implemented as custom NSViews in IB. Some of these panels contain multiple text fields. There are 2 problems I am seeing.

1. I cannot get any of the NSTextFields to automatically become the first responder in the window after switching the NSBox's content view.
2. Hitting TAB in one of the NSTextFields on the custom view does not move to the next one.


I've tried using various combinations of overriding canBecomeKeyView and acceptsFirstResponder on my custom view but it doesn't seem to make any difference. I'm new to Cocoa, so I'm sure I'm just missing something obvious. Is using a custom NSView in this case even the right thing to do? I just need to have a way to represent a grouping of controls in IB that I can swap in and out of the main window as appropriate.

Thanks,
-Nathan
_______________________________________________

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


  • Follow-Ups:
    • Re: Nested NSViews and keyboard focus
      • From: Jacob Lukas <email@hidden>
  • Prev by Date: Re: Number only NSTextField's
  • Next by Date: Re: Opacity of Menus
  • Previous by thread: Re: Number only NSTextField's
  • Next by thread: Re: Nested NSViews and keyboard focus
  • Index(es):
    • Date
    • Thread