A bug in CCBReader...

A bug in CCBReader...
0.0 0


hi all.

i’m using cocosbuilder for my map editor, and also using cocos2d::extension::CCBReader as parser…
basically it works fine, but i found a little trouble, i think maybe it’s a bug:

in cocosbuilder side, I had a custom class and ccb file named “NestCCBClass”, added a custom property, named myCustomPropery, default value was “hello”.
then i made another ccb class “Test”, nest use NestCCBClass, and set the value of “myCustomPropery” as “world”.

in code side, both of class implements CCBMemberVariableAssigner.
here’s the error: in onAssignCCBCustomProperty, i can never get the value “world”, but always get default value “hello”….

my cocos2d version is “cocos2d-2.1rc0-x-2.1.2”, cocosbuilder version is 3.0-alpha5…

1.png (47.5 KB)

2.png (98.0 KB)




i need help…


i tried to solve it by myself, but unfortunately i failed…


i traced code into CCNodeLoader::parseProperties(CCNode * pNode, CCNode * pParent, CCBReader * pCCBReader), and found that:

if (dynamic_cast<CCBFile*>(pNode) != NULL)
CCBFile *ccbNode = (CCBFile*)pNode;
if (ccbNode~~>getCCBFileNode && isExtraProp)
//……code here will never be called… because ccbNode~~>getCCBFileNode() alway return NULL