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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T13:57:30+00:00 2026-06-12T13:57:30+00:00

Basically, this is a noob question. Forgive. :( Every example in books or on

  • 0

Basically, this is a noob question. Forgive. 🙁

Every example in books or on the web I’ve seen uses add remove buttons with a Table to create an instance of a managed object. I can do this. I have done this. But I’d rather not do this. I’d much rather use an NSForm and click an “add” button to create the instance and add it to the database.

I’m sure this just needs to be a method on the button itself. It fetches values from the form such as name, age… whatever and then when add is clicked, it adds that to the table and to the data base.

I did find some material that showed me how to “manually” create a MO instance, but then, I couldn’t set the properties / attributes of that instance using
newStudent.firstName = [[form cellAtIndex:1] stringValue];

Would I need to create a class for Student and set properties there? Am I just missing something stupid? My noob instincts tell me this isn’t the best approach. There’s got to be a more elegant touch.

Any suggestions welcome. I’m new to OS programming and even newer to Core Data. Thank you very much.

  • 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-12T13:57:31+00:00Added an answer on June 12, 2026 at 1:57 pm

    You can create object of MO class student using:

    Student *newStudent = (Student *)[NSEntityDescription insertNewObjectForEntityForName:@"Student" inManagedObjectContext:self.managedObjectContext]; //assume that you have property NSManagedObjectContext *managedObjectContext;
    

    now you can use:

    newStudent.firstName = [[form cellAtIndex:1] stringValue];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is basically a very noob question about Ruby console (IRB), but I couldn't
This might sound like a noob question but here goes; Basically, I'm passing a
This is a very noob question. I'm basically just trying to run the hello
Basically this is a question how to access local scope handler. I trying to
I'm new to EF so please excuse me if this is a noob question.
This is probably a noob question, but how I've implemented the appendTo() function below
Sorry if this is a stupid noob question. I'm doing a very small project
I am an IOS noob and this may be a dumb question, so here
Ok this may seem like a bit of a noob question but one many
This is probably a bit of a noob question but seeing as I am

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.