+1  A: 

The error should provide the name of the class that received the unrecognized method and the unrecognized method that was sent.

(1) If you recognize the method name -- if you have written a line (or lines) of code that calls that method -- review the line(s) of code and make sure that the target of the method call is valid, is of the correct type, and hasn't been over released somewhere else.

Often, an unrecognized method invocation error is caused when you have over-released an object somewhere and a new object of the wrong type has taken up residence in the memory of the old object.

(2) If you didn't write a call to that method, then you have other supplied the wrong type of object to some framework method or, again, you have over-released something.

If you suspect over-release, turn on NSZombies or use the Zombie tracking feature in Instruments (yeah, what Peter said).

So, the error is NSTreeControllerTreeNode ... doesn't respond to -copyWithZone:.

Almost guarantee that indicates that you have tried to shove a tree controller tree node into a dictionary somewhere as a key and the dictionary is trying to copy it. At least, that is most typically what happens.

This still could be an over-release problem where an instance of NSTreeControllerTreeNode happens to be sitting in memory where an NSString used to be.

Search the Xcode documentation for NSZombie for more information on turning it on in your current version of the dev tools.

bbum
I think it must be No.2. When I go to the "Run with Performance Tool" menu there is no Zombies option as you can see here - http://www.grabup.com/uploads/56e2b7a108333326d1acc6bfdde7d064.png?direct
Joshua
Well, there may be a Zombies template in some hypothetical future version of Xcode, but there is not in 3.1.3. ☺
Peter Hosey
What else I noticed is that if I get rid of the code from the first question the App runs fine with no problem. So the problem has to be some where in that code.
Joshua
Is there something in that Code that could cause the error?
Joshua
A: 

NSTreeControllerTreeNode isn't a standard Cocoa class.

Did you mean to use NSTreeController or NSTreeNode instead?

Abizern
That's the thing, I haven't actually used it. What I noticed was that when I got rid of the code (the code in the first post) the App ran without a hitch, so the problem must be in the code from the first post. And I haven't use NSTreeControllerTreeNode there.
Joshua
What do you mean by the 'code in the first post'?
Abizern
What I meant was, The code that is in the Question.
Joshua
Okay, then when you remove the code, what then becomes the datasource of the outline view?
Abizern
The other code I have in the Datasource file. Should I post that too?
Joshua
Posted the other code I have in the Datasource file.
Joshua
Could the other code in the Datasource be something to do with the error?
Joshua