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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T02:54:02+00:00 2026-06-13T02:54:02+00:00

all. Entities: [Library {title}] <–>> [Book {title}] <<–>> [Author {name}] Controllers: NSArrayController [Library] =>

  • 0

all.

Entities:

[Library {title}] <-->> [Book {title}] <<-->> [Author {name}]

Controllers:

NSArrayController [Library] => {Entity: Library}
NSArrayController [Book] => {Entity: Book, ContentSet: Library, books}
NSArrayController [Author] => {Entity: Author, ContentSet: Book, authors}
NSArrayController [Authors] => {Entity: Author}

Form:

[ NSPopUpButton *]
[ NSTableView **]
[ add ] [ remove ]

* button get content from NSArrayController [Author w/o contentset
option]

** table get content from another NSArrayController [Author
with contentset option set as Library.books]

Question:

how i can add Author into Book.authors from Author entity?
(Use previous authors for any book)

  • 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-13T02:54:03+00:00Added an answer on June 13, 2026 at 2:54 am

    1) set PopUpButton property

       {
         Content: NSArrayController [Authors], ArrangedObjects
         Content Values: NSArrayController [Authors], ArrangedObjects, name
         Selected Index: NSArrayController [Authors], selectionIndex
       }
    

    2) add

    @property (assign) IBOutlet *authorsController, *bookController; 
    

    and link it with NSArrayControllers

    3) add this code and link with button:

    - (IBAction)insertSelectedItem:(id)sender
    {
        MOAuthor *author = self.authorsController.content[self.authorsController.selectionIndex]; // get current (selected) author
    
        MOBook *book = self.bookController.content[self.bookController.selectionIndex]; // get current guide
    
        [book addAuthorsObject:author]; // add step into guide
    
        NSError *err = nil;
    
        [book.managedObjectContext save:&err]; // save all
    }
    

    MOBook, MOAuthor – ManagedObject class created from Entity

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

Sidebar

Related Questions

I have two entities // All details has been removed @Entity @Table(name = "A_TABLE_NAME")
I have my domain entities. These entities are all together in a class library.
Suppose we have 3 entities: Library, Section & Book. A Library consists of several
I would like to perform a small operation on all entities of a specific
I want to parse the following XML document to resolve all entities in it:
I need to make a database that is highly localized. For almost all entities
In a game i'm programming, I use a composite object for all entities within
All my entities can not be deleted - only deactivated, so they don't appear
I have about 8 entities that all have a one to one relationship with
We have to create a historical log of all the changed entities. we have

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.