People I'd like to see if an element at index is not present in a different (or current ) array. So for instance if my array looked somewhat like this
Then I would like to see if aExerciseRef.IDE ( which is "sdf" for instance ) does or does not exist at index. I assume I'd have to use some sort of iterator ..
I know this doesn't work , it's just to elaborate what I'd like to achieve.
edit:
Let me elaborate a bit more
I'm (again ) using XML parser for this one
.
@HarryPotter thanks for your answer but that's not what I want to achieve.
@dejo aExerciseRef is a class I'm using to fill different attributes ( just like the Books class in the this example http://www.iphonesdkarticles.com/2008/11/parsing-xml-files.html )
example
To elaborate a little further
Imagine an array being filled with aExerciseRef.IDE's then I would like to compare if the elements in this array exist in the instruct array.
So I would like to see if the element at let's say position 2 (wtrk).
exists in the array which was being filled with the aExerciseRef.IDE's.
note: I'm using the same array here so not a different one that I'm filling. So i'm actually comparing if AN aExerciseRef.IDE is present at location index.
Code:
[wer, wer4 , wer5 , werp , klo ...
Then I would like to see if aExerciseRef.IDE ( which is "sdf" for instance ) does or does not exist at index. I assume I'd have to use some sort of iterator ..
Code:
for( int i = 0; i < 20; i++ )
{
if([instruct objectAtIndex:index2 + i] != [instruct containsObject:aExerciseRef.IDE] )
NSLog(@"object doesn't exist at this index %i, i );
else
NSLog(@"well does exist")
}
I know this doesn't work , it's just to elaborate what I'd like to achieve.
edit:
Let me elaborate a bit more
I'm (again ) using XML parser for this one
@HarryPotter thanks for your answer but that's not what I want to achieve.
@dejo aExerciseRef is a class I'm using to fill different attributes ( just like the Books class in the this example http://www.iphonesdkarticles.com/2008/11/parsing-xml-files.html )
example
Code:
if( aworkout != nil )
{
aExerciseRef = [[exerciseref alloc] init];
aExerciseRef.IDE = [attributeDict objectForKey:@"id"];
aExerciseRef.header = [attributeDict objectForKey:@"header"];
To elaborate a little further
Imagine an array being filled with aExerciseRef.IDE's then I would like to compare if the elements in this array exist in the instruct array.
So I would like to see if the element at let's say position 2 (wtrk).
Code:
[wer, wtrk, wer , sla ...
exists in the array which was being filled with the aExerciseRef.IDE's.
note: I'm using the same array here so not a different one that I'm filling. So i'm actually comparing if AN aExerciseRef.IDE is present at location index.