A: 

Not knowing much about your code, I can't tell you the exact problem, however:

At the top, you differentiate between two different arrays depending on the value of searching. Later, you only use the array you'd use when searching is false, with the same index, which seems to be an array of NSDictionarys, not NSStrings. You also seem to be accessing it using indexPath.section the first time, and indexPath.row the second time.

The line I'm talking about, in particular, is this one:

if ([[listOfItems  objectAtIndex:indexPath.row] isEqual:@"neon"]){

Based on the previous code, that is, this line:

NSDictionary *dictionary = [listOfItems objectAtIndex:indexPath.section];

I'm guessing that listOfItems contains a number of items equal to the number of sections in your table view, not the number of rows in the section you clicked in, and I'm also guessing that the return value will never be equal to @"neon" because it is an NSDictionary.

Ed Marty
Ive added the rest of the class as an edit. I still can not get a view to push. With the provided code can you see anything that would get a new view?
Tanner
where do you expect this "Countries" array to come from if the only entry uses the key "Elements"?
Ed Marty
Its been changed to Elements. No change in selecting or pushing happened.
Tanner
A: 

According to the exception you are getting you are calling objectAtIndex: with a value of 60 and the NSMutableArray doesn't have anything in it (range 0..0). You need to fix this before you'll get to the push code.

You should be able to tell from the call stack in the debugger which array is being accessed when the exception occurs or you can add NSLog before you do objectAtIndex: to see what you have. For example, you have:

if ([[listOfItems  objectAtIndex:indexPath.row] isEqual:@"neon"]){

If you add this next line before the one above, you would be able to see what index you are trying to access (indexPath.row) and how many you actually have in listOfItems:

NSLog(@"listOfItems has %d, accessing %d", [listOfItems count], indexPath.row);
progrmr
Thank you for your response. I clicked the 3rd item and got this:2010-05-09 19:43:49.392 iTeachU[4674:307] listOfItems has 1, accessing 3Is there a way to tell this to push a view using row 3 or something like that?
Tanner
You're asking the wrong question. You should be asking why is there only 1 item in listOfItems? How can you expect to get item 3 out of it when there is only 1 there?
progrmr
A: 

Solved with this code for anyone wondering. - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { NSString *selectedCountry = nil;

if(searching)
    selectedCountry = [copyListOfItems objectAtIndex:indexPath.row];
else {

    NSDictionary *dictionary = [listOfItems objectAtIndex:indexPath.section];
    NSArray *array = [dictionary objectForKey:@"Elements"];
    selectedCountry = [array objectAtIndex:indexPath.row];
}

//Initialize the detail view controller and display it.
NSLog(@"listOfItems has %d, accessing %d", [listOfItems count], indexPath.row);
NSDictionary *dictionary = [listOfItems objectAtIndex:indexPath.section];
NSArray *array = [dictionary objectForKey:@"Elements"];
NSString *cellValue = [array objectAtIndex:indexPath.row];

if ([cellValue isEqual:@"neon"]){
    NSLog(@"Neon");
    Neon *abo = [[Neon alloc] initWithNibName:@"Neon" bundle:nil];
    [self.navigationController pushViewController:abo animated:YES];
    NSLog(@"Neon Worked");
    [abo release];
}

}

Tanner
If any of those answers solved your problem or help lead you in the right direction it would be nice to select one or upvote if they were helpful.
progrmr
The problem was solved in the sense that it pushed that one view. However the search bar uses a copy of the views. I can get the copyListItems and listItems to push only a single view. Selecting others forces the app to crash. I still need a way to push all views.
Tanner
By declaring a string and setting isEqual works for all including search. Your code of nslog helped. I will mark it as the answer since it lead me to the right path. Thank you for your help.
Tanner