small medium large xlarge

Generic-user-small
27 Sep 2009, 11:13
Caroline (5 posts)

Great book so far - but Chapter 4 has me stumped. I am running Leopard, and won’t be upgrading in the near future.

Does Chapter 4 - Classes and Objects - require Snow Leopard? I create an Application -> Cocoa Application (no checkboxes that I can see), and I don’t get a HelloWorldAppDelegate class created.

Thanks Caroline


Also, the heavy lines across top and bottom of pages uses a lot of ink when printing out the pdf :) - I’m sure it will look wonderful in the book, but I like to print out my pdfs so that I can scribble all over them.

Generic-user-small
27 Sep 2009, 11:58
Caroline (5 posts)

I used Application > Core Data Application instead, which created the delegate class file, and added the 3 line method as listed at the top of page 58.

As there was no @synthesize window in the code, I changed the last line of the method at the bottom of page 59 to: [[window contentView] addSubview:label];

Generic-user-small
28 Sep 2009, 22:19
Caroline (5 posts)

It also happened later in the book, so a better solution may be this:

http://stackoverflow.com/questions/1375214/application-delegate-cocoa

(I guess an even better solution would be to upgrade to Snow Leopard :D)

Daniel_pragsmall
05 Nov 2009, 13:02
Daniel H Steinberg (97 posts)

Thanks – I’m assuming that developers reading the book will be on Snow Leopard and using the latest tools even if you are targeting older versions of the OS. All but the last two chapters can be used by anyone. The last two chapters are going to target Snow Leopard and probably 64 bit.

Generic-user-small
16 Nov 2009, 11:30
Martin Wood (3 posts)

For me, when using XCode 3.2.1 on Snow Leopard 10.6.2 the default delegate isn’t created when creating a vanilla ‘Cocoa Application’ with no checkboxes (additionally the older .nib format is used, not .xib, which can be confusing earlier in the book).

Enabling the ‘Core Data’ checkbox whilst creating a ‘Cocoa Application’ project gives me the delegate (+ .xib).

Is my XCode installation hosed, or can someone verify this behaviour?

Generic-user-small
17 Nov 2009, 13:20
Martin Wood (3 posts)

Update - I might be hitting a XCode bug, my symptoms are exactly as described here :

http://telliott99.blogspot.com/2009/10/xcode-templates-messed-up.html

I’ve wiped out XCode using

$ sudo /Developer/Library/uninstall-devtools –mode=all

but get the same problem after re-installing.

Hmm…so what’s the quickest way of getting a clean copy of the folder :

/Developer/Library/Xcode/Project Templates/Application/Cocoa Application

as mine just contains a mess of other template folders as listed in that blog post.

Generic-user-small
17 Nov 2009, 14:42
Martin Wood (3 posts)

Well, I pruned out the other rogue Project Template folders and files which shouldn’t have been within the base “Cocoa Application” template folder (verbose details - http://martinwood.org/2009/11/17/xcode-project-template-bug-on-snow-leopard/ ) and it looks like it has done the trick.

Back to the book :-)

Generic-user-small
02 Jan 2010, 18:12
Graham Ashton (3 posts)

I ran into the same problem. Having read Martin’s post I started digging about inside each of the template folders, and it seems as though the older templates for some types of project haven’t been overridden by the newer templates. The folders are there though, you just need to move them into the right place.

See http://effectif.com/articles/xcode-template-problems

Cheers, Graham

You must be logged in to comment