Talk:Programming Mac OS X with Cocoa for Beginners

What is this? Where is the downloadable code? —The preceding unsigned comment was added by Kray257 (talk • contribs). (This comment was left on /Download code examples -- SB_Johnny | talk 11:13, 23 August 2006 (UTC))

-kHandleSize parameter needs to be decalared!
PROBLEM!!!!

-kHandleSize is a parameter in the method drawBounds and in the return value for the method handleRect; and needs to be declared somewhere! The proceeding methods are in different files as well so the scope of -kHandleSize goes beyond either file.

This omission prevents the application from compiling!

Also the source files are not available from the link in this Wiki Books directory as they are supposed to be. A missing page error appears when the link to download the source is clicked. This is an excellent tutorial and it's a shame that it is not usable in it's current form.

_dragShape undeclared
The _dragShape data object in WKDDrawView is undeclared as well and causes a compile time error. -Boogityboo04

whoever wrote this, thank you

Some Problems and Fixes
Thanks for this very helpful introduction; you've obviously spent a lot of time on it. I've found a few problems with the page "Wikidraw's view class" (some noted by previous users). Here they are:

1. kHandleShape is not defined in WKDShape.m. The answer to this is to define a static int up about the @implementation section:

static int kHandleSize = 3;

2. _dragShape is not declared in WKDDrawView.h. I'm pretty sure this is supposed to be a WKDShape*, right? So you need to add this:

WKDShape* _dragShape

3. There are some #imports missing. If I recall, you need #import "WKDShape.h" in WKDDrawView.{h,m}.

4. You forgot to write the implementation for currentTool in ToolsController.m. This is easy: just return _curTool.

5. There is a bug in how WKDDrawView learns about tool changes (via notifications). If the user changes tools but there are no documents open, then nothing will be subscribed to the event, and sCurrentTool won't be changed. But I gather that this whole notification business is more for teaching the concept than good design, so you might just want to mention that it has this flaw.

Thanks again for all your work!

Updates requested
I'm liking the book, but it's getting to the point that it takes some guess work in order to get through it, because XCode has changed so much since it was originally written, and the instructions could use some "fleshing out." Nevertheless, thank you to everyone for making this available! 70.233.146.21 (talk) 00:55, 11 June 2010 (UTC)

At this point, I'm voting that we make an effective rewrite of this book. The material here is fantastic, but, as mentioned, is sorely in need of an update. Yes, it was targetted towards 10.3, but a "beginner" is likely going to have 10.6. Also, some sections get kind of hard to follow, in my opinion (especially when trying to translate to newer versions of Xcode). All in all, taking what material is here and adding a bit more structure and polish could result in an excellent resource! --12.34.246.73 (talk) 19:01, 25 August 2010 (UTC)