I’m relatively new to Cocos, and I’m trying to get a CocosBuilder3 to work with the cocos2d-x Javascript bindings, but I’m getting an assert on load:
SpitValve.app//jsb_cocosbuilder.js:95:TypeError: callbackNode.setCallback is not a function
This is on setting a CCControl to be handled by a custom class in Javascript. Are CCControls not properly handled by the Javascript bindings in cocos2d-x right now? I’ve seen some updated bindings for the CocosBuilder extensions on the cocos-iphone forums, but I haven’t seen anything regarding cocos2d-x.
Here’s how I set up the CCB:
# Created a file with a CLayer root and a CCControlButton.
# Checked Document>Javascript Controlled, and set the root’s JS Controller to MenuLayerController.
# Set the button’s up handler selector to onPlay, and Target to Document Root.
# Created a class called MenuLayerController in my game, which has an onPlay function in the prototype.
I’d like pointers on how I can resolve this problem and properly use CCControlButton callbacks in JS code.
Thank you,
Sean