Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

subhashmaxnet

macrumors newbie
Original poster
Apr 7, 2010
1
0
hi,friends
right now i am trying to store values which im returning from webservice.
i amusing [arrayname addObject:eek:bject] method to add the objects to the array
-(void)parser:(NSXMLParser *) parser foundCharacters:(NSString *)string
{
//NSMutableArray *number=[NSMutableArray arrayWithCapacity:6];
[number addObject:mad:"a"];

if (elementFound)
{
[soapResults appendString: string];

[number addObject:string]; NSLog(@"added to array=%@",string);


//NSLog(@"This code is executing=%@",string);

}
}

-(IBAction)all:(id)sender
{

/*for(i=0;i<4;i++)
{

[number addObject:mad:"Hello"];

}*/
NSLog(@"Getting into");
for(NSString *mystr in number)
{

NSLog(@"Name=%@",mystr);
}

}

the code is adding only one i.e last element to the array i
have also tried insertobject:eek:bj atindex method but it is giving me error that
terminating due to uncaught exception err.
 
Use code tags. The above is an unreadable mess right now. If you want to see how they work quote this reply.
Code:
[codeTags use:YES];
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.