views:

24

answers:

0

Hi,

I'm trying to work out how to move data, parsed from an RSS feed into a UITableView into an entirely new view, for example a UIMapKit, but not having much luck. Each time I get "dog.name" (see below) = null.

I have an NSMutableArray, called "Dogs". It's created in a "currentDogstableview" class - which downloads the data from an RSS feed using an "rssDownload" class. When a user selects a row from the "currentDogstableview" (which just lists each animals name), I display the more detailed data (such as type, age, name etc.) in another UITableView, this time "currentDogsdetailview". I do this by saying for instance:

 cell.detailTextLabel.text = dog.name;

I then want to be able to call that data (dog.name for the array of "dogs") in a new view, for instance a UIMapView. As I said above, at the moment when I have dog.name I get = null.

Thanks for any help.

Updated: Here's more code: This is how the NSMutableArray is created:

- (void)beginParsing {
    NSLog(@"Parsing has begun");
    //self.navigationItem.rightBarButtonItem.enabled = NO;
    // Allocate the array for dog storage, or empty the results of previous parses
    if (dogs == nil) {
        NSLog(@"Grabbing array");
        self.incidents = [NSMutableArray array];
    } else {
        [dogs removeAllObjects];
        [self.tableView reloadData];
    }
    // Create the parser, set its delegate, and start it.
    self.parser = [[DogsImporter alloc] init];      
    parser.delegate = self;
    [parser start];
}

To display fields from dogs in the UITableView, the following code is used:

Dog *dog = nil;
dog = [dogs objectAtIndex:indexPath.row];
cell.titleLabel.text = [dog name];
cell.informationLabel.text = [dog type];