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()":
..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
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