Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Danneman101

macrumors 6502
Original poster
Aug 14, 2008
361
1
Hi,

Im trying to manipulate the samplecode "DrillDownSave" found on the iPhone-developerspage:

iPhone Dev Center

From the class "LeafViewController.m", I want to use the array "savedLocation" defined in "AppDelegate.h/m", and whose values are set in the "Level1-3ViewController.m"-files (3 files) in their respective "didSelectRowAtIndexPath()"-functions.

However, this array seems to totally empty whenever I try to reach it. This is the code used in "LeafViewController.m -> awakeFromNib()":

Code:
// Enables access to the stuff in AppDelegate.h/m
AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];

// Check the first value in "savedLocation"-array 
if ([appDelegate.savedLocation objectAtIndex:0] == nil)
{
	// do stuff to verify that "savedLocation" actually is nil
}

..and it verifies that "nil" (or even "0") is the value inside it.

What am I doing incorrect? Doesnt this array survive with values intact?

Thanks, Daniel
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.