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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T01:45:37+00:00 2026-05-30T01:45:37+00:00

Why isnt this working…? I have a ‘Client’ entity and a ‘Car’ entity in

  • 0

Why isnt this working…?

I have a ‘Client’ entity and a ‘Car’ entity in a core data model. It is a one-to-many relationship. I have chosen a ‘Client’ from a table view controller and pushed a new table view controller which should display all Cars that Client owns.

Based on information in other answers in StackOverflow, I have compiled the following short code to kick out the name of the cars to display in the cells of the table view controller:

NSSet *cars = client.cars;
carsArray = [cars allObjects];
Car *car = (Car *)[carsArray objectAtIndex:indexPath.row];
cell.textLabel.text = [car carName];

However, this is not working. Can anyone see why? It compiles fine. FYI – ‘client’ is the chosen client object; carsArray is a NSArray declared within the viewcontroller header file and a Car has a attribute called ‘carName’.

  • 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-30T01:45:37+00:00Added an answer on May 30, 2026 at 1:45 am

    What error are you getting &

    Where are you calling this in the new “pushed view controller”? You need to create the carsArray before the tableView datasource methods set in.

    Of course, make sure the passed entity of “client” is not nil.

    THis could be in viewDidLoad or some initializer.

    NSSet *cars = client.cars;
    carsArray = [cars allObjects];
    

    The following could be in cellForRow..

    Car *car = (Car *)[carsArray objectAtIndex:indexPath.row];
    cell.textLabel.text = [car carName];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have no idea why this isnt working. <video src=American.avi controls=controls> <object data=American.avi type=video/avi
the second function isnt working? $('.edit_hover').live('hover', function(e){ $(this).stop(); var half_width = ($(this).css('width').slice(0, -2))/2; var
I'm not sure why this isn't working. I don't have any errors, but what
I can't get my head around why this isn't working.. I have a relatively
im not sure why this isnt working, Im just passing a blank string and
Can anyone see why this isnt working? For this example the box should turn
Maybe I´m just stupid but I cant understand why this isnt working. I want
I have a jquery variable that isnt working and it's most likeley because i
I have this code I'm working on, see link: http://jsfiddle.net/PqsAD/3/ The problem is depending
Could you please take a look and tell why this isnt working i cant

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.