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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T06:47:38+00:00 2026-06-01T06:47:38+00:00

I have 4 entities in my core data with the same parent entity. They

  • 0

I have 4 entities in my core data with the same parent entity. They almost share the same properties.

I need to use the same xib fie (a panel to modify the entities properties), for 3 of these 4 entities. The remaining one is using another panel. If the user selects more entities, the same NSTextField is used to modify the respective properties in all those selected entities.

How can I bind the objects in my xib file to the different entities, should I bind them to the parent entity? (In the parent I don’t have all properties though).

I have a lot of text fields in the xib file, binding them programmatically would be quite a lot of work. Binding in interface builder is much easier.

thanks

  • 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-06-01T06:47:39+00:00Added an answer on June 1, 2026 at 6:47 am

    Assuming that you are using some sort of controller in IB (NSArrayController or NSObjectController) to manage your entities, you can create an outlet for that controller in your view controller.

    Then in the awakeFromNib method you can do:

    switch (myChoosenEntity) {
      case 1:
        [[self myEntityController] setEntityName: @"MyFirstEntity"];
        break;
      case 2:
        [[self myEntityController] setEntityName: @"MySecondEntity"];
        break;
      default:
        break
    }
    

    The entity controller would then be set to use the entity of your choice. This approach would still allow you to make the bindings in IB. The only downside might be that IB cannot show you the possible attributes to bind against as the actual entity is only determined at run time.

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

Sidebar

Related Questions

I have some entities in core data, and they are all sub classes of
I have two Core Data entities: Parent and Child . Parent has to-many relationship
I have several core data entities that contains a bunch of empty NSString properties.
IOS5.1 / XCode 4.3 I have 2 entities in my core data, lets call
In my Core Data model I have two entities: List and Patient. List has
I'm using core data in my app. I have two entities that are related:
So I have the following code for fetching all of my core data entities
I have an App using core data with 3 entities with very similar attributes.
Say I have a core data model with a few entities and, throughout the
I have a question concerning Core Data and how, if at all, Entities get

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.