please i try to put the content of two NSArray in two NSMutableArray but it seems not working :
NSMutableArray *newArrayTypeCarburant = [[NSMutableArray alloc]init];
NSMutableArray *newArrayNomStation = [[NSMutableArray alloc]init];
for(int i=0; i <[topStation.listeTypesDesCarburants count]; i++)
{
[newArrayTypeCarburant addObjectsFromArray: [topStation.listeTypesDesCarburants objectAtIndex:i]];
}
for(int i=0; i <[topStation.listeDesEnseignes count]; i++)
{
[newArrayNomStation addObjectsFromArray: [topStation.listeDesEnseignes objectAtIndex:i]];
}
topStation.listeDesEnseignes and topStation.listeTypesDesCarburants are two NSArray and global variables declared in the appdelegate class . Help please, thx in advance ))
EDIT i try that :
NSMutableArray *newArrayTypeCarburant = [[NSMutableArray alloc]init];
NSMutableArray *newArrayNomStation = [[NSMutableArray alloc]init];
for(int i=0; i <[topStation.listeTypesDesCarburants count]; i++)
{
[newArrayTypeCarburant addObject: [topStation.listeTypesDesCarburants objectAtIndex:i]];
}
for(int i=0; i <[topStation.listeDesEnseignes count]; i++)
{
[newArrayNomStation addObject: [topStation.listeDesEnseignes objectAtIndex:i]];
}
self.pickerArrayTypeCarburant = newArrayTypeCarburant;
self.pickerArrayNomStation = newArrayNomStation;
the first picker contains value from the array but when i try to click on the second picker, an exception was thrown :
2011-05-04 15:10:06.631[1065:207] -[__NSCFDictionary isEqualToString:]: unrecognized selector sent to instance 0x6e389a0
2011-05-04 15:10:06.633[1065:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFDictionary isEqualToString:]: unrecognized selector sent to instance 0x6e389a0'