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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T16:42:56+00:00 2026-05-30T16:42:56+00:00

hi all according to below code i am trying to uploading the NSMutableArray items

  • 0

hi all according to below code i am trying to uploading the NSMutableArray items to the tableview but it showing problem like

ContactTesting[1040:f803] * Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘ -[NSMutableArray count]: method sent to an uninitialized mutable array object’
*
* First throw call stack:
(0x13bc052 0x154dd0a 0x13a820b 0x247b 0x1edf2b 0x1f0722 0xa07c7 0xa02c1 0xa328c 0xa7783 0x52322 0x13bde72 0x1d6692d 0x1d70827 0x1cf6fa7 0x1cf8ea6 0x1d8430c 0x124c6 0x12bd6 0x21743 0x221f8 0x15aa9 0x12a6fa9 0x13901c5 0x12f5022 0x12f390a 0x12f2db4 0x12f2ccb 0x122a7 0x13a9b 0x1bc8 0x1b25 0x1)

Basically i am getting NSMutableArray *array items as like

2012-02-29 14:24:20.246 ContactTesting[564:f803] name is->>>>>>> : (
"\n        Enrico Gaetani",
"\n        J\U00e9r\U00f4me Tredan",
"\n        Mike Tsalidis",
"\n        Dana Sugarman",
"\n        Necip Ozyucel",
"\n        Goksel Topbas",
"\n        Nizar Abdul-Baki",
"\n        Johannes Kanis",
"\n        Kara Westhusing",
"\n        Andreas Erlacher",
"\n        Rudy Van Hoe",
"\n        Lars Nygaard",
"\n        Juha Karppinen",
"\n        Ronan Geraghty",
"\n        Luca Venturelli",
"\n        Michel N'Guettia",
"\n        John Henrik Andersen",
"\n        Jos\U00e9 Grilo",
"\n        Luis Miguel Garcia Oliva",
"\n        Andre Henriksson",
"\n        Marc Holitscher",
"\n        Lucas Searle",
"\n        Ansgar Heinen",
"\n        Vasily Malanin",
"\n        Marek Zamlynski",
"\n        Petr Vasa",
"\n        Peter Budai",
"\n        Kostyantyn Khrushchelov",
"\n        Nicholas Molfetas",
"\n        Bogdan Constantinescu",
"\n        Peter Jirsak",
"\n        Marko Drev",
"\n        Petra Cicek",
"\n        Dragana Jovic (E-Search)",
"\n        Linas Peciura",
"\n        Tsvetomir Mitev",
"\n        Renat Begaidar",
"\n        Pauline Maillard",
"\n        Mark Chaban",
"\n        Dayana Orlan-Nevo",
"\n        Neveen Nassif",
"\n        Francois Smith",
"\n        Jeroen Unger",
"\n        Kris Vandermeulen",
"\n        Claus Petersen",
"\n        Riku Reimaa",

but when i am using the tableView methods it quit the functionality so how to solve the problem give the solution it is too urgent for me in iphone

- (void)viewDidLoad
{
   [super viewDidLoad];


    [self testing];

    array=[NSMutableArray alloc];
    myTableView.delegate=self;
    myTableView.dataSource=self;
    myTableView.separatorStyle=  UITableViewCellSeparatorStyleNone;

    myTableView.backgroundColor = [[UIColor alloc] initWithPatternImage:[UIImage imageNamed:@"list.png"]];
    myTableView.scrollEnabled=YES;


// Do any additional setup after loading the view, typically from a nib.
}







- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { 
    return 1;   
}
- (NSInteger)tableView:(UITableView *)table numberOfRowsInSection:(NSInteger)section {
    return [array count];
}

-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ 

static NSString *CellIdentifier = @"Cell";
//here you check for PreCreated cell.
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
    cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
}

//Fill the cells...  
cell.textLabel.text = [array objectAtIndex: indexPath.row];
//yourMutableArray is Array 
return cell;
}

-(void)testing{
//  NSLog(@">>>>>>>>>>>>233333");

NSString *jobSearchUrlString = [NSString stringWithFormat:@"http://infra2appsmobile.cloudapp.net/Infra2Apps.svc/Contacts"];
//NSLog(@"url for new articles is = %@",jobSearchUrlString);
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:jobSearchUrlString]];   

NSURLConnection *theconnection =  [[NSURLConnection alloc] initWithRequest:request delegate:self];
if (theconnection) {
    RoutData = [[NSMutableData alloc] init];
}




}



-(void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response
{   

[RoutData setLength: 0];
}
-(void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data
{
[RoutData appendData:data];

NSString *thexml = [[NSString alloc] initWithData:RoutData encoding:NSUTF8StringEncoding];

NSDictionary *dictXML= [XMLReader dictionaryForXMLString:thexml error:nil];

NSMutableArray *arrStation = [[dictXML objectForKey:@"feed"] objectForKey:@"entry"] ;//this would return the array of station dictionaries



//    for (int i=0; i<[arrStation count]; i++) {
//        NSLog(@"--->>>ContactNameis:<<<---- %@",[[[[[arrStation objectAtIndex:i] objectForKey:@"content"] objectForKey:@"m:properties"] objectForKey:@"d:ContactName"] objectForKey:@"text"]);



    array=[[NSMutableArray alloc]init];
    for (int i=0; i<[arrStation count]; i++){
        NSString *str=[[[[[arrStation objectAtIndex:i] objectForKey:@"content"]   objectForKey:@"m:properties"] objectForKey:@"d:ContactName"] objectForKey:@"text"];
      //  NSlog(@"name is : %@",str);
        //NSLog(@"name is->>>>>>> : %@",str);
        [array addObject:str];
        NSLog(@"name is->>>>>>> : %@",array);

               }



    // NSString *str=[[arrStation objectAtIndex:i ] objectForKey:@"d:ContactName"];
    //NSLog(@"8********************8%@",[[arrStation objectAtIndex:i ] objectForKey:@"d:ContactName"]);
    //NSLog(@"--->>>id is ::<<<---- %@",[[[[[arrStation objectAtIndex:i] objectForKey:@"content"] objectForKey:@"m:properties"] objectForKey:@"d:Id"] objectForKey:@"text"]);
    //        
    // NSLog(@"--->>>Emails ::<<<---- %@",[[[[[arrStation objectAtIndex:i] objectForKey:@"content"] objectForKey:@"m:properties"] objectForKey:@"d:Email"] objectForKey:@"text"]);
//        
//NSLog(@"--------->>>>>>>>>>><<<<<<<<<<<%@",arrStation);

 }
}
  • 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-30T16:42:57+00:00Added an answer on May 30, 2026 at 4:42 pm

    After receive all Data , reload the tableView

    // array=[[NSMutableArray alloc]init];   remove this 
    for (int i=0; i<[arrStation count]; i++){
         NSString *str=[[[[[arrStation objectAtIndex:i] objectForKey:@"content"]   objectForKey:@"m:properties"] objectForKey:@"d:ContactName"] objectForKey:@"text"];
         // NSlog(@"name is : %@",str);
         // NSLog(@"name is->>>>>>> : %@",str);
         [array addObject:str];
         NSLog(@"name is->>>>>>> : %@",array);
         [myTableView reloadData];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

All in the question title, and my simplified code below. According to the docs:
Can you do a better code? I need to check/uncheck all childs according to
I have this code which gives me the below output in firebug, so according
I have spent the past couple of hours trying all types of variations but
According to Herb Sutter the code below wouldn't compile. See this site http://www.gotw.ca/gotw/066.htm from
I need to have a query which list all the user according to the
We all know that you can overload a function according to the parameters: int
First of all, I checked all the newbie mistakes. According to Firebug, that element
I want to list all files on an FTP server using PHP. According to
I'm having an odd issue where, according to Javascript (in Chrome), all of the

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.