Re: erroneous template
Re: erroneous template
- Subject: Re: erroneous template
- From: Matt Neuburg <email@hidden>
- Date: Sun, 23 Oct 2011 19:25:30 -0700
On Oct 23, 2011, at 2:06 PM, Fritz Anderson wrote:
> I'm not sure I understand what you're asking for, still less why delivering what the template promises should be "erroneous."
>
> The user selects a template that is advertised to provide an iOS project with no view controllers. You seem to expect that if he asks for no view controllers, he should, for his own good and edification, be given a view controller anyway.
Actually I expect that there should be no warning. In Xcode 4.0 there was no such warning when the user started from the "Window-based Application" template, which likewise has no root view controller. This made the Window-based Application template a great place to start, pedagogically, to demonstrate various elementary things - and my book took advantage of this fact.
Now, to a certain extent, in revising the book, I can still use the new Empty Application template for this purpose, but the warning may be disconcerting to the student / reader.
In general there have been some massive upheavals in the way the templates are structured, in the passage from Xcode 4.0 to Xcode 4.2. For example, in Xcode 4.0, templates had a main nib which was automatically loaded thru the plist (NSMainNibFile), and which contained the window. The bootstrapping proceeded from this main nib: for example, the Window-based Application's main nib was responsible in turn for instantiating the app delegate and hooking it to the application as delegate (and hooking the window to the delegate thru an outlet). Now, however, templates have no main nib at all (there is no NSMainNibFile entry in the plist); instead, the call to UIApplicationMain in main.m generates the app delegate instance, and window is generated in code by the app delegate.
There's nothing *wrong* with this - indeed, it's much simpler and more elegant in many ways - but the result is that the templates seem to have gotten a little out of kilter with other things in Xcode and Cocoa. The fact that using the Empty Application template as it stands generates a warning at runtime is just one them. Another is that the Application nib template now makes no sense: it is exactly the nib structure I just described as going with the old Empty Window project template, so it made sense, but now it can't be fitted into any of the current project templates.
All I'm saying is that if you've been following developments consistently, you're aware that Xcode 4.0 had templates that made mutual sense, whereas Xcode 4.2 has templates which give a sense that things have moved forward without the right hand quite knowing what the left hand was doing. m.
--
matt neuburg, phd = email@hidden, http://www.apeth.net/matt/
pantes anthropoi tou eidenai oregontai phusei
Among the 2007 MacTech Top 25, http://tinyurl.com/2rh4pf
Programming iOS 4! http://www.apeth.net/matt/default.html#iosbook
RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html
TidBITS, Mac news and reviews since 1990, http://www.tidbits.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden