views:

104

answers:

1

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?

+1  A: 

Are you sure appDelegate.mines is not empty?

KennyTM
yes, that seems to be it. my database initialization code contains:NSLog(@"first if statement")if(sqlite3_prepare_v2(database, sqlStatement, -1, }it seems the "second if statement initialized" is not appearing on the console.
kevin Mendoza
Why aren't you using Core Data? Need to support pre-3.0 devices?
Adam Eberbach
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