[js-binding]

Why can’t I get the instance which already exist in the extension binding from my own binding class.

JSBool js_smartfish_ArmatureRenderer_getArmature(JSContext *cx, uint32_t argc, jsval *vp)
{
    JSObject *obj = JS_THIS_OBJECT(cx, vp);
    js_proxy_t *proxy = jsb_get_js_proxy(obj);
    smartfish::ArmatureRenderer* cobj = (smartfish::ArmatureRenderer *)(proxy ? proxy->ptr : NULL);
    JSB_PRECONDITION2( cobj, cx, JS_FALSE, "Invalid Native Object");
    if (argc == 0) {
        CCArmature* ret = cobj->getArmature();
        jsval jsret;
        #pragma warning NO CONVERSION FROM NATIVE FOR CCArmature*;
        JS_SET_RVAL(cx, vp, jsret);
        return JS_TRUE;
    }

    JS_ReportError(cx, "wrong number of arguments: %d, was expecting %d", argc, 0);
    return JS_FALSE;
}LSE;
}

I find CCArmature has been bind in the cocos2d-x extension,why it still give me this warning?

#pragma warning NO CONVERSION FROM NATIVE FOR CCArmature*;

when i call the function,it throw this error:

Cocos2d: JS: /Users/chenyonghua/Library/Application Support/iPhone Simulator/7.0.3-64/Applications/0B6A07FA-3A33-4487-9B36-277FE7C7DFCE/SuperCommander.app/src/supercommander/world/EntityCreator.js:79:TypeError: armature.getAnimation is not a function

Somebody knows what’s going on with it?

It seems to be related to namespace,we fix it a while back on master brance.https://github.com/cocos2d/bindings-generator/tree/master

got it,Thanks bro!