Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3977366
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T04:54:54+00:00 2026-05-20T04:54:54+00:00

I have to upgrade one existing application and neeed to split its existing UI

  • 0

I have to upgrade one existing application and neeed to split its existing UI into separate NIBs. I have planning to start with creating separate NIBs and NSViewController for all my splitted UIs. Now the problem is my NSViewController didn’t respond on keyboard TAB and SHFIT+TAB events, I simply wants my NSViewController to set focus on appropriate child control in my dynamically loaded NSViewController view when user click TAB or SHIFT+TAB.

Thanks,

EDITED :
Following is my requirement.

I have three sub views which i need to load dynamically and switch using NSPopupButton in my MainWindow placeholder NSBox.

For checking i have created new cocoa app and added one NSPopupButton and NSBox to Window and join the outlets for NSPopupButton and NSBox.

Second, I have created three new NSViewController’s with three different NIB’s containing separate custom view containing two or three NSTextField’s child controls.

- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
}

In the main app delegate function i am adding all the three NSViewController’s to an array and later swapping of views using replaceSubview to replace views in placeholder NSBox.

I have added following code in all the three NSViewController’s, but i am still not getting focus on child controls by pressing TAB or SHIFT+tab keys.

- (void)loadView {
    [super loadView];

    // store the responder that’s right after the view in the responder chain
    NSResponder *nextResponder = [[self view] nextResponder];

    // set the view controller (self) as the next responder after the view
    [[self view] setNextResponder:self];

    // set the stored responder as the next responder after the view controller
    [self setNextResponder:nextResponder];
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T04:54:55+00:00Added an answer on May 20, 2026 at 4:54 am

    Even though NSViewController inherits from NSResponder, Cocoa doesn’t automatically add NSViewController instances to the responder chain. You need to do it yourself.

    One possible solution is to insert your view controller into the responder chain between the view it is controlling and the next responder of that view. For instance, in your view controller implementation,

    - (void)loadView {
        [super loadView];
    
        // store the responder that’s right after the view in the responder chain
        NSResponder *nextResponder = [[self view] nextResponder];
    
        // set the view controller (self) as the next responder after the view
        [[self view] setNextResponder:self];
    
        // set the stored responder as the next responder after the view controller
        [self setNextResponder:nextResponder];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a windows client and i want to upgrade subversion from 1.5.3 to
I have a VB5 (non .net) project that I would like to upgrade to
I'm trying to upgrade my subversion server (I have it hosted with Dreamhost) This
I have a long-running Python server and would like to be able to upgrade
Sometimes you need to upgrade the database with many rows that you have in
Thanks to a library upgrade (easymock 2.2 -> 2.4), we're having tests that have
I have upgraded a MS Visual Studio Application from VS 2003 to VS 2008
In a current C# application I do maintenance on, we have upgraded to Visual
I have recently upgraded some of my web applications to ASP.NET 3.5 by installing
I have just upgraded our company's domain controller from NT 4.0 to Windows 2008

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.