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 4107794
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T21:33:46+00:00 2026-05-20T21:33:46+00:00

I would like to update the UI in my application from the AppDelegate, but

  • 0

I would like to update the UI in my application from the AppDelegate, but whenever I call it as so:

Controller *object = [[Controller alloc] init];
[object methodHere];

It doesn’t seem to update the UI. What am I doing wrong here? I have put in a NSLog to see if it was being called, and it is. Here is a sample project that shows the error.

Edit: Can someone just show me what to change to the project I provided. I just don’t know what to type into my project so that I can change the value of a simple NSTextField from another class.

  • 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-20T21:33:47+00:00Added an answer on May 20, 2026 at 9:33 pm

    This is really simple, and Chuck’s comments basically explain what you need to do, but I will lay out the code explicitly for you. In testAppDelegate.h:

    @interface testAppDelegate : NSObject <NSApplicationDelegate> {
        NSWindow *window;
        // You can make an IBOutlet to any kind of object you
        // want; it's just a way for you to get a reference
        // in code to an object that has been alloc'd and
        // init'd already by the xib mechanism.
        IBOutlet Controller *controller;
    
    }
    

    Then go into your xib in InterfaceBuilder and hook up that outlet from your Test App Delegate object to your Controller object (these objects are already present in the xib).

    In testAppDelegate.m:

    - (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
        // This is the key:
        // _Don't_ alloc/init a new controller object. The 
        // objects in your xib are allocated and initialized 
        // by virtue of being in that file. You just need to 
        // give your AppDelegate a pointer to it, as above.
        [controller setTextValue:@"hello"];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to update a Windows Forms application to provide the following features:
I would like to make the update of the web application as automated as
I would like to update the application icon and the splash (loading) screen of
I would like to create a web application which receive status(text) from android. The
I would like to develop an application that will receive pictures from a camera
I would like to share some text and an image from my web application
I would like to update a large number of C++ source files with an
I would like to update a dll for a server process without stopping the
I would like my program to update itself (downloading a new exe and/or some
I would like to use ON DUPLICATE KEY UPDATE in Zend Framework 1.5, is

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.