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

  • Home
  • SEARCH
  • 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 8469053
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T16:07:01+00:00 2026-06-10T16:07:01+00:00

I am trying to create a basic app that displays event information from a

  • 0

I am trying to create a basic app that displays event information from a server.
So far I download all the information in an xml file and parse it using NSXMLParser.
I have an event object that I have created that stores all of the information for each event, I then populate a NSMutableArray with these events.
I would like to then asynchronously load the images relating to each event as each UITableView Cell displays, and store them in a NSData in the event objects located within the NSMutableArray. This way I would only load images that I need.
The layout of my NSMutableArray looks like this(simplified):

events
      -event1
            -(NSString *)title
            -(NSURL *)imageURL
            -(NSData *)eventData
      -event2
            -(NSString *)title
            -(NSURL *)imageURL
            -(NSData *)eventData
etc..

I have no idea what the best practice here is and am struggling to make it work.

  • Option 1
    I can try to set it straight from the MasterViewController, this doesn’t seem right to me, and I get an error.
    If I use the code

    [[events objectAtIndex:cellIndexPath.row] eventImageData] = [[NSData alloc] initWithContentsOfURL:[[events objectAtIndex:cellIndexPath.row] eventImgURL]];
    

I get the error: expression not assignable

  • Option 2
    I can write a method within the event object itself to download the image. I did this, and for the life of me couldn’t get the event object to ask the MasterViewController to refresh the appropriate NSTableViewCell once it had finished getting the image.

My question is, am I on the right track with either of these trains of thought? Can I allocate a new NSData inside of an object within a NSMutableArray? or was I on the right track asking the event object to download it’s own image?

Thanks for taking the time to read this overly-long-winded question.

  • 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-10T16:07:02+00:00Added an answer on June 10, 2026 at 4:07 pm

    You can’t use a getter method to set a property, you have to use a setter method:

    [[events objectAtIndex:cellIndexPath.row] setEventImageData:[[NSData alloc] initWithContentsOfURL:[[events objectAtIndex:cellIndexPath.row] eventImgURL]]];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create a basic database trigger that conditionally deletes rows from database1.table1
I'm simply trying to create a secure user file that will save basic login
I'm currently trying to create the app.config at runtime. The basic idea is that
I'm trying to create an app in Visual Basic that will allow a user
I'm trying to create an element in an XML where the basic content is
I am trying to create an android app that will connect to various web
I'm trying to create a User model for my Ruby on Rails app that
I am trying to create a custom dialog class that inherits from Dialog that
I'm trying to create a basic navigation app using UINavigationController as root container for
I've been asked to create an app that will get data back from a

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.