I'm working with CocosBuilder 2.1 and Cocos2d-iPhone 2.0. I've gotten CocosBuilder to compile, and I'm having a weird problem when using their one-text-label example in my project.
Here's the code in question, from CCBReader.m line 823:
Class class = NSClassFromString(className);
if (!class)
{
NSLog(@"CCBReader: Could not create class of type %@",className);
return NULL;
}
This fails with the text "Could not create class of type CCLabelTTF". But if I change the code like this:
Class class = NSClassFromString(className);
if (!class)
{
CCLabelTTF* tempLabel = [[CCLabelTTF alloc] init];
[tempLabel release];
NSLog(@"CCBReader: Could not create class of type %@",className);
return NULL;
}
It works. I don't see anyone else having problems with CocosBuilder in this spot, so what's going on?
The weird thing is that this change can only be affecting it at compiler level, because the added code is inside the error segment, right?