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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:42:00+00:00 2026-05-23T08:42:00+00:00

My hobby project is getting over my head! I am using an XML parser,

  • 0

My hobby project is getting over my head! I am using an XML parser, which gives me a set of values
row.blurb
row.url
row.keywords
etc.

I now need to put them into an NSDictionary to populate a table, but my understanding of dictionaries is letting me down. I was expecting to be able to say something like

[exhibitors addObject:[[NSMutableDictionary alloc]initWithObjectsAndKeys:
[row.blurb],@"blurb",[row.url],@"url",[row.keywords],"keywords",nil]];

But, as none of you will be at all surprised, I get a crash. Can anyone help me with the correct way to do this?

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-05-23T08:42:01+00:00Added an answer on May 23, 2026 at 8:42 am

    You are providing a C string as one of the keys -> "keywords".

    That is not a valid key in an NSDictionary instance. You probably intended it to be @"keywords".

    To add, you are also leaking memory as you are creating an object but aren’t releasing it as you don’t have a reference. You can use the convenience method dictionaryWithObjectsAndKeys : to create an autoreleased instance so that you don’t leak.

    [exhibitors addObject:[NSMutableDictionary dictionaryWithObjectsAndKeys:row.blurb, @"blurb", row.url, @"url", row.keywords, @"keywords", nil]];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was recently considering using GoogleData for a hobby project to store my service's
as a small (large) hobby project I've set out to make a (very primitive)
I have recently started using PlayN for a hobby project and has now stumbled
I have a hobby project that is written in C# using MonoDevelop. I've been
I have a good sized hobby project, around 66K LOC, over at http://www.wheelmud.net Recently,
I have an idea for a hobby project which performs some code analysis and
I'm currently developing a small hobby project (open sourced at https://github.com/grav/mailbum ) which quite
I'm doing a raytracer hobby project, and originally I was using structs for my
As a hobby project to keep myself out of trouble, I'd like to build
I am doing a hobby project to scrape the content of an ASP.net website

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.