![]() | Unknown class 'NotifyingClass' |
|
11 Nov 2010, 10:40
Dr Ian Hocking (5 posts) |
Hi there I’m just starting out with Cocoa programming – love the book thus far. I’m new to Xcode but have programmed heavily in C about ten years ago. I’m having a niggling issue, however. When I try to compile the ‘Text.app’ project after the addition of the first NotifyingClass instance, I get the following message in the log:
I’ve downloaded the sample code from the website and it runs fine. I’ve compared this project to my own closely, and both seem identical. But I’m still getting the above error! I could just use the sample code and proceed to the next chapter but I’d really like to figure out what’s causing this. Any ideas? I’m running Xcode 1.2.4 (64 bit), IDE 1708.0, Core 1705.0, ToolSupport 1591.0 Best wishes Ian |
|
11 Nov 2010, 11:08
Tim Isted (105 posts) |
Hi Ian, Are the two files If you right-click (or Ctrl-click) on the Finally, can you try Cleaning your project before Building it again? Choose Build > Clean (Shift-Cmd-K), then Build as normal. Please let me know how you get on, |
|
11 Nov 2010, 18:16
Dr Ian Hocking (5 posts) |
Hi Tim Thanks for the quick reply – and the great book.
Check.
Check.
Hmm, I don’t seem to have one of these.
Tried that, and I had the same error. The plot thickens! Best |
|
11 Nov 2010, 18:55
Tim Isted (105 posts) |
Bah – I’m an idiot – not the If that doesn’t work, then perhaps you could send me your project and I’ll take a look. My email address is most easily found via my own website… Sorry you’ve run into this – it’s not a typical error to have at this point! |
|
14 Nov 2010, 11:57
Dr Ian Hocking (5 posts) |
Hi Tim I’ve just had a look for the check box in the NotifyingClass.m file and it is checked. Curious! I’m going to email the project to you. All very strange – maybe it corrupted in some way. I think I’ll work through the first exercise again, just for practice, and see if the same issue comes up. Best wishes and thanks for looking into this, |
|
14 Nov 2010, 12:28
Dr Ian Hocking (5 posts) |
Hi Tim I’ve just worked through the tutorial again and now it’s working fine. I think we can put this down to driver error…Somehow I must have clicked / not clicked something at some point. Best wishes |
|
14 Nov 2010, 13:08
Tim Isted (105 posts) |
Hi Ian, For the sake of completeness, and in case anyone else has this problem, this is what cured the problem for the original project you emailed me:
The “include in target” checkbox is this one: If you can’t see the split view shown in that image, press (Shift-Cmd-E). This would appear to have been caused by a very strange glitch in Xcode itself. At some point, it convinced itself that it was compiling and including the file, when it wasn’t. I don’t know the exact reason why this might happen, but the above steps essentially tell it “Don’t include the file” (which it isn’t anyway), then “Do include the file” thereby ‘resetting’ its mistake. Thanks, |
|
27 Nov 2010, 19:19
Dr Ian Hocking (5 posts) |
Hi Tim Thanks again for sorting this out. Cheers |
|
04 Jan 2013, 08:47
Ronald Hofmann (1 post) |
Hi Tim, I used to have a class TimeNumbers in my project which was not necessary anymore some day and I removed it from my project (reference). Since that point of time I have the problem that I get this message in the console when building the project: OK, MainMenu.nib is xml and I took a closer look at the contents. When I add TimeNumbers again (and also put it to compile sources) the message is gone. The error message doesn´t really prevent my code from working but I´m interested what I´m doing wrong. Any ideas? Greetings from Switzerland, Ronald Hofmann |
| You must be logged in to comment |

