0

after much debugging, I have determined that this code is ignoring the fast enumeration loop and blindly jumping to the end:

-(void)loadOutAnnotations
{
    NSLog(@"entering Annotation enumeration Loop");

    iProspectFresno_LiteAppDelegate *appDelegate =(iProspectFresno_LiteAppDelegate *)[[UIApplication sharedApplication] delegate];

    FlipsideViewController *viewController = (FlipsideViewController *)[[UIApplication sharedApplication] delegate];

    CLLocationCoordinate2D workingCoordinate;
    NSLog(@"initializing");
    NSMutableArray* mines = [[NSMutableArray alloc] initWithArray(NSMutableArray *)appDelegate.mines];
    for (id mine in mines)
    {
        NSLog(@"in the loop");
        //rest of loop code
   }
}

the console prints "entering Annotation enumeration Loop" as well as the "initializing," but it seems to bypass the enumeration loop completely, as it is not printing "in the loop." what am I doing wrong?

Vladimir
  • 170,431
  • 36
  • 387
  • 313
kevin Mendoza
  • 1,211
  • 2
  • 12
  • 16

1 Answers1

1

Are you sure appDelegate.mines is not empty?

kennytm
  • 510,854
  • 105
  • 1,084
  • 1,005
  • yes, that seems to be it. my database initialization code contains: NSLog(@"first if statement") if(sqlite3_prepare_v2(database, sqlStatement, -1, &compileStatement, NULL) == SQLITE_OK) { NSLog(@" second if statement initialized"); } it seems the "second if statement initialized" is not appearing on the console. – kevin Mendoza Jan 14 '10 at 06:05
  • 1
    Why aren't you using Core Data? Need to support pre-3.0 devices? – Adam Eberbach Jan 14 '10 at 08:06
  • Id figure I would learn core data after I get this application running. sort of a proof of concept; and yes, I would like to support pre 3.0 devices. – kevin Mendoza Jan 14 '10 at 09:23