hi,friends
right now i am trying to store values which im returning from webservice.
i amusing [arrayname addObject
bject] method to add the objects to the array
-(void)parser
NSXMLParser *) parser foundCharacters
NSString *)string
{
//NSMutableArray *number=[NSMutableArray arrayWithCapacity:6];
[number addObject
"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
"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
bj atindex method but it is giving me error that
terminating due to uncaught exception err.
right now i am trying to store values which im returning from webservice.
i amusing [arrayname addObject
-(void)parser
{
//NSMutableArray *number=[NSMutableArray arrayWithCapacity:6];
[number addObject
if (elementFound)
{
[soapResults appendString: string];
[number addObject:string]; NSLog(@"added to array=%@",string);
//NSLog(@"This code is executing=%@",string);
}
}
-(IBAction)all
{
/*for(i=0;i<4;i++)
{
[number addObject
}*/
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
terminating due to uncaught exception err.