Page 208: No new untitled document


#1

So far my version of the application doesn’t produce an untitled document. Did I miss a setting, i.e. which setting did I miss before I got to this page?

On p216, added code at the top of the page. The preference pane can now control opening a new document when clicking on the app in the dock. Starting from Xcode with command-R still doesn’t open a new document.


#2

The default behavior of document based applications is to open an untitled window. Do you get a titled window or no window at all ? I can not imagine, but maybe you missed to set the “document based” option when you created the project.

Uploaded with ImageShack.us

Happy New Year!
Vertex


#3

Vertex. thanks for the comment. I don’t think I missed that checkbox. I would have missed a variety of template code I think. It may be an interaction with starting within Xcode. Maybe there is a setting there? I thought it might open an untitled window if I opened it from the finder but haven’t found the standalone apps yet :wink: I have a /tmp folder but it only has some launch-… files.


#4

OK, I found the compiled app in /Library/Developer/Xcode/…Products/Debug/

And the version at page 216 works properly, opening or not opening an Untitled Document. Lions open windows can confuse. That is, setting preference unchecked and quitting with an untitled document gives the document window when it is re-opened. Closing the untitled document before quitting works as expected. Interesting set of interactions.


#5

It seems there is a setting in Xcode as explained in the Figure 13.5 page 217. Checking ‘Launch application without state restoration’ makes it works as expected. The comment at the bottom of page 216 appears quite apt. :wink:

Happy New Year!