Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cocosbuilder binding #423

Open
cettco opened this issue Sep 12, 2013 · 5 comments
Open

cocosbuilder binding #423

cettco opened this issue Sep 12, 2013 · 5 comments

Comments

@cettco
Copy link

cettco commented Sep 12, 2013

I use cocos2d-x. When I bind CCLabelTTF,it's OK.
CCB_MEMBERVARIABLEASSIGNER_GLUE(this,"mylabel",CCLabelTTF_,this->label);
but when I bind CCSprite,it's crashed.
CCB_MEMBERVARIABLEASSIGNER_GLUE(this,"sprite2",CCSprite_,this->msprite);

@vkbsb
Copy link

vkbsb commented Sep 12, 2013

Make sure that "msprite" is initialized to NULL in the constructor.
CCB_MEMBERVARIABLEASSIGNER_GLUE calls release on the pointer if its' not
null. This could be causing the crash.

On Thu, Sep 12, 2013 at 2:18 PM, Shiqi Zhang notifications@github.hscsec.cnwrote:

I use cocos2d-x. When I bind CCLabelTTF,it's OK.
CCB_MEMBERVARIABLEASSIGNER_GLUE(this,"mylabel",CCLabelTTF_,this->label);
but when I bind CCSprite,it's crashed.
CCB_MEMBERVARIABLEASSIGNER_GLUE(this,"sprite2",CCSprite_,this->msprite);


Reply to this email directly or view it on GitHubhttps://github.com//issues/423
.

@cettco
Copy link
Author

cettco commented Sep 13, 2013

You are right. When I initialize it to NULL, it works.

On Fri, Sep 13, 2013 at 1:54 AM, vkbsb notifications@github.com wrote:

Make sure that "msprite" is initialized to NULL in the constructor.
CCB_MEMBERVARIABLEASSIGNER_GLUE calls release on the pointer if its' not
null. This could be causing the crash.

On Thu, Sep 12, 2013 at 2:18 PM, Shiqi Zhang notifications@github.hscsec.cnwrote:

I use cocos2d-x. When I bind CCLabelTTF,it's OK.
CCB_MEMBERVARIABLEASSIGNER_GLUE(this,"mylabel",CCLabelTTF_,this->label);
but when I bind CCSprite,it's crashed.
CCB_MEMBERVARIABLEASSIGNER_GLUE(this,"sprite2",CCSprite_,this->msprite);


Reply to this email directly or view it on GitHub<
https://github.com/cocos2d/CocosBuilder/issues/423>
.


Reply to this email directly or view it on GitHubhttps://github.com//issues/423#issuecomment-24341816
.

@wulin9005
Copy link

I have this problem too ,

@cettco
Copy link
Author

cettco commented Sep 13, 2013

You should initialize it to NULL in constructor or init method

On Fri, Sep 13, 2013 at 7:57 PM, wulin9005 notifications@github.com wrote:

I have this problem too ,


Reply to this email directly or view it on GitHubhttps://github.com//issues/423#issuecomment-24389617
.

@wulin9005
Copy link

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants