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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:20:38+00:00 2026-05-25T10:20:38+00:00

I have a view that wants to show summarized usage data for my app.

  • 0

I have a view that wants to show summarized usage data for my app. Conveniently enough I have a cocoa core data entity with all the usage data pre-aggregated (so it has only one row ever). I would like to bind each individual attribute in the entity to different NSTextFields (eg not in an NSTableView).

This does not seem to be a usage pattern that core data + interface builder handles nicely. So far what I am doing is duplicating my aggregated attributes into NSUserDefaults and binding my text fields to the defaults. I would like an better, elegant way to do this.

Any better ideas out there? Do I need to be smacked in the head with a big fat clue?

Thanks as always for reading…

  • 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-25T10:20:38+00:00Added an answer on May 25, 2026 at 10:20 am

    Ok I just hit my own head with my own big fat clue.
    The solution was to use NSObjectController.

    1. Add instance of NSObjectController to the NSWindowController implementation as an IBOutlet.
    2. Add the NSObjectController to the xib for the dialog and bind the fields to it.
    3. Link the NSObjectController in your view/window controller (File’s Owner) to the NSObjectController in the xib.
    4. Implement the controller’s windowDidLoad.

    In my case it looks like this in the header:

    NSObjectController *dataCtrl;
    ...
    @property (nonatomic, retain) IBOutlet NSObjectController *dataCtrl;
    

    And like this in the implementation

        @synthesize dataCtrl;
        ...
        - (void)windowDidLoad
        {
            NSManagedObject *totals = [StatsSupport getTotalRecord];
            [[self dataCtrl] setContent:totals];   // where the rubber meets the road
            [super windowDidLoad];
        }
    

    And of course +[StatsSupport getTotalRecord] is your basic core data fetch type code which if you read this far you know how that looks. (and it will probably already exist since you need this code or something similar just to perform normal data reading/updating)

    Lastly do a little happy dance because you made cocoa do some work for you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Project Index View that shows all the projects in an app
1.I have a user that wants to view the current items version history on
I have a view based application and in that I want to show driving
I have an iPad application that can be used in all four view modes
In my android app I have a gridview that I want to show images
I have an application that present data in a summarized way. The structure of
I'm working on a simple note-taking/painting app. I have a view controller that works
I have a view that I want to add some custom drawing to. I
I have a view that I want to be converted into JSON. What is
I have an index view that I want to update automatically as the user

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.