Re: Newbie Q: Why is UIWindow in the AppDelegate not an ivar?

2008-12-14 Thread Debajit Adhikary
It turns out the window can in fact be accessed as [[UIApplication sharedApplication] keyWindow] // readonly property On Sat, Dec 13, 2008 at 7:45 PM, Luke Hiesterman luket...@apple.com wrote: Generally speaking you will do well for yourself to follow Apple's example over Erica's. I haven't

Newbie Q: Why is UIWindow in the AppDelegate not an ivar?

2008-12-13 Thread Debajit Adhikary
When you create an iPhone app, in the AppDelegate, why is the UIWindow created locally within -applicationDidFinishLaunching and not declared as an ivar? The functionality does not seem to change either way. I'd like to know how one approach is better than the other. What I presume is that the

Re: Newbie Q: Why is UIWindow in the AppDelegate not an ivar?

2008-12-13 Thread Debajit Adhikary
I meant to ask what the tradeoffs are between declaring the UIWindow object as an instance variable in the AppDelegate vs. as a local object in -applicationDidFinishLaunching: The specific example I'd mentioned was from Erica Sadun's book, and looking at Apple's sample code, and the code that

Re: Newbie Q: Why is UIWindow in the AppDelegate not an ivar?

2008-12-13 Thread Luke Hiesterman
Generally speaking you will do well for yourself to follow Apple's example over Erica's. I haven't actually read her book but I've had several examples come to my attention of where she doesn't do things in the best way. Erica is a talented hacker but please get in the habit of following