I am having an issue getting integer values form an NSMutable array. I have several buttons on the screen with a matching tag property value (button1 has a tag value of 1, etc.). When a button is pressed, I add the numeric tag value to the NSMutable array. Later, I want to loop through the objects to see what values are pressed to build a query. However, Iget a SIGABRT error in the loop.
//pairNumber is the 'tag' value from a button
-(void) numberSearchArray:(NSInteger)pairNumber;
{
[self.queryPairs addObject:[NSNumber numberWithInt: pairNumber]];
}
//***************************
-(void)buildQuery:(BOOL *)function numberToUse:(NSInteger)number
{
//other code not shown
int pair_values [6];
int compare_total = [queryPairs count];
for (int x = 0; x<=compare_total-1; x++){
pair_values[x] = (NSUInteger)[queryPairs objectAtIndex:x]; //SIGABRT error
//code continued...
}