Table doesn't display any randomPossessions


#1

I’ve just finished entering the method on pg.150 and have a couple problems.

First when I finish entering the method and build/run the app i see a black screen and then the app exits, automatically, out to the home screen. I found that when I commented out,“Possession *p = [possessions …” the the app will run without exiting.

Which brings me to my second problem, once I remove the code mentioned above, the table is empty!
No randomPoessessions or text whatsoever - just a blank table.

The method I have entered into the .m file:

-(UITableViewCell *)tableView:(UITableView *)tableView
	   cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
		// create an instance of UITableViewCell, with default appearance
		UITableViewCell *cell = 
		[[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault
						   reuseIdentifier:@"UITableViewCell"] autorelease];
		

		Possession *p = [possessions objectAtIndex:[indexPath row]];
		                         [[cell textLabel] setText:[p description]];
		
		return cell;
}

OS X: Lion 10.7.2
Xcode: 3.2.6
iPhone sim: 4.3