cocosbuilder 3.0 alpha 5 Left Tab under Project is blank.

Hi,

I was using cocosbuilder version 2.1 but when I loaded the files in xcode, it gave me the error that reader: 5 and file : 3. So to fix this, I downloaded cocosbuilder version 3.0 alpha 5. But in this version of Cocosbuilder I cant see my files under the Project header on the left. I had created a ccb file also, which I am unable to open as I cant see it under project. Any help is appreciated.

Have you had any luck with this issue? I’m encountering it as well with Alpha 5

Nope. No Luck as of yet. Posted the same thing in the cocos2d forum and no luck there either.

What version of MacOS are you running? People running 10.8.x don’t seem to have the problem. I’m on 10.7.3

This is the tech spec of my system:

  • Processor 2 GHz Intel Core i7
  • Memory 4 GB 1333 MHz DDR3
  • Graphics AMD Radeon HD 6490M 256 MB
  • Software Mac OS X Lion 10.7.5 (11G63)

Looks like you’re in the same boat as I am.
I’m going to update to 10.8.x
I’ll report back

Any luck?

I may not be able to upgrade to 10.8 just yet. I have a new machine coming tomorrow and will test it out on that and let you know. I’m also going to spend some time seeing if I can fix the bug. I’ll definitely keep you posted

OK, I found the problem. CocosBuilder alpha 5 is definitely not compatible with 10.7.x. It requires 10.8.x. CocosBuilderAppDelegate is using an API introduced in 10.8 to load NIB files. When run on a 10.7 os, the method never returns (since it doesn’t exit). The error is logged but the app doesn’t exit or anything. it just doesn’t load the preview pane. If you are willing to build from source, you use the following setupResourceManager function instead of the existing one. Basically this code does the same thing except uses the 10.7 API to load the NIB.

  • (void) setupResourceManager
    {
    // Load resource manager
    resManager = [ResourceManager sharedManager];

// Setup preview
previewViewOwner = [[ResourceManagerPreviewView alloc] init];

// * USE 10.7 API*
NSNib* aNib = [[NSNib alloc] initWithNibNamed:"ResourceManagerPreviewView" bundle:[NSBundle mainBundle]]; NSArray* topLevelObjs = nil; if (![aNib instantiateNibWithOwner:previewViewOwner topLevelObjects:&topLevelObjs]) { NSLog(“Warning! Could not load ResourceManagerPreviewView nib file.”);
return;
}
[aNib release];
[topLevelObjs makeObjectsPerformSelector:@selector(release)];
// * END USE 10.7 API*

// Find the preview view
for (id obj in topLevelObjs)
{
if ([obj isKindOfClass:[NSView class]])
{
previewView = obj;
break;
}
}

[previewViewContainer addSubview:previewView];

// Setup project display
projectOutlineHandler = [[ResourceManagerOutlineHandler alloc] initWithOutlineView:outlineProject resType:kCCBResTypeNone preview:previewViewOwner];

resourceManagerSplitView.delegate = previewViewOwner;
}

Dave

sorry for the weird formatting.

Thanks. Ill have a look at it once I get home.

@David it works. Thanks a lot.

Terrific, glad to hear it!
-D

@The Devil,help!

@Shi Lang David has provided the solution to the problem. See the 9th post for the solution.

@The Devil
Thanks for helping!But,i’m a little confused,setupResourceManager function is the source code of the CocosBuilder APP ? or the source code of my own project? How to replace it? Can i rebuild the source code of CocosBuilder?

Its the source code of CocosBuilder, which can be downloaded from their website. Its open source code, which u can build like any other Xcode project.

@The Devil
It works. Thank U! :slight_smile:

David Asbell wrote:

OK, I found the problem. CocosBuilder alpha 5 is definitely not compatible with 10.7.x. It requires 10.8.x. CocosBuilderAppDelegate is using an API introduced in 10.8 to load NIB files. When run on a 10.7 os, the method never returns (since it doesn’t exit). The error is logged but the app doesn’t exit or anything. it just doesn’t load the preview pane. If you are willing to build from source, you use the following setupResourceManager function instead of the existing one. Basically this code does the same thing except uses the 10.7 API to load the NIB.
>
>
Dave

You post has definitely saved me. Thanks a lot.

Don’t know why “NSNib* aNib” appears to be “NSNib aNib” in the post, maybe is some kind of auto format?

Thx Dave, fixed the issue right away, kick ass man :slight_smile: