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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T17:55:19+00:00 2026-05-31T17:55:19+00:00

I am working on an app and i have to save some data in

  • 0

I am working on an app and i have to save some data in the dictionary and then i have to load that data and showing to user whatever the options user saved.
when i get data from dictionary it crashes on second time not on first time and gives different crash log every time.
like

-[UIDeviceRGBColor objectAtIndex:]: unrecognized selector sent to instance 0x68c22d0

or

[UIControlTargetAction count]: unrecognized selector sent to instance 0x68683d0

or

   0 : <CFString 0x687cb30 [0x124eb38]>{contents = "dish1"} = UIDeviceWhiteColorSpace 0 0.5

my code is this

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    if (tableView == menuTableView) {

        [optionsView addSubview:topScrollView];
        optionFlag=NO;
        [self optionScreenMethod:indexPath.row];
        NSString *dishSelect=[NSString stringWithFormat:@"dish%d",indexPath.row];
        NSMutableArray *dishesArray=[[NSMutableArray alloc]init];
        NSMutableArray *dishDicArray=[[NSMutableArray alloc]init];
        dishesArray=[dishDictionary objectForKey:dishSelect];
        NSLog(@"%d",[dishesArray count]);
        if ([dishesArray count]>0) {
            optionFlag=YES;
        }else{
            for (int i=0; i<[tempStr intValue]; i++) {
                DishData *dishData=[[DishData alloc]init];
                dishData.dishTitle=(NSMutableString*)[[tableMenuArray objectAtIndex:indexPath.row] itemName];
                dishData.accompArrayIndex=nil;
                dishData.cookArrayIndex=nil;
                dishData.dishComent=nil;
                dishData.nonMandArray=nil;
                [dishDicArray addObject:dishData];
            }
            [dishDictionary setObject:dishDicArray forKey:dishSelect];
        }
        //[dishesArray release];
        //[dishDicArray release];
        dishSelectRow=indexPath.row;
      //  NSString *dishSelect=[NSString stringWithFormat:@"dish%d",indexPath.row];
        
        [isSelected removeAllObjects];
        [isSelectedAccompArray removeAllObjects];
        [isSelectedCookArray removeAllObjects];
        [self defaultDataArray];
        [accompmentTblView reloadData];
        [cookingTblView reloadData];
        [nonMandTblView reloadData];
        [nonMandtSelectOptionArray removeAllObjects];

        optionsView.hidden=NO;

    }
  • 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-31T17:55:20+00:00Added an answer on May 31, 2026 at 5:55 pm
    - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
    {
    
           //If possible make a singleton instance here of "dishDictionary" may solve your issue of crashing (Rather diclare it at the class level)
          //if(!dishDictionary)
              dishDictionary=[[NSMutableDictionary alloc]init];
    
          ..........
    
          //Replace this line :
          NSMutableArray *dishDicArray=[[NSMutableArray alloc]init];
    
          to
    
          NSMutableArray *dishesArray=[[NSMutableArray alloc]initWithArray:[dishDictionary objectForKey:dishSelect]];
    
          and remove
          dishesArray=[dishDictionary objectForKey:dishSelect];
    
          ..........
          //may will not crash than try this
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using HTML textarea for user to input some data and save that
I have inherited a working VB.NET 2.0 web app that has several User Controls
I'm working on a WinForms app and I have a user control in it.
I have a FB app that is working nice with the postbacks from within
I have an app and there is some basic functionality that needs to be
I have built in some Core Data support into my app from the Core
I have a .NET 4 WinForms app that uses the ADO.NET Entity Framework. Some
I am working on a little WinForm app and have been trying to find
I have an MFC app which I have been working on for a few
I have an Open Source app and I have it working on Windows, Linux

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.