You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This seems to flop due to "JS_CFUNC_constructor" been used instead of "JS_CFUNC_constructor_or_func" so it raises a constructor called without "new" issue. If I edit the wrap method and place JS_CFUNC_constructor_or_func that issue is gone and a this
proto = detail::GetPropertyPrototype(ctx, this_value);
Casts a trying to access undefined property issue. If I modify the previous code into
JSValue proto ;
if (JS_IsUndefined(this_value))
{
proto = JS_GetClassProto(ctx, js_traits<std::shared_ptr<T>>::QJSClassId);
} else
proto = detail::GetPropertyPrototype(ctx, this_value);
Both return TRUE, but when I do console.log(Point.emptyPoint.x)
I get TypeError: Expected type struct Point, got object with classid 1, Im unsure what to edit at this point to support what we need, any help would be very appreciated.
The text was updated successfully, but these errors were encountered:
Hello,
Im trying to make an extended Point class that inherits from our C++ Point class, something like this on C++ side:
And this on JS side:
This seems to flop due to "JS_CFUNC_constructor" been used instead of "JS_CFUNC_constructor_or_func" so it raises a constructor called without "new" issue. If I edit the wrap method and place JS_CFUNC_constructor_or_func that issue is gone and a this
proto = detail::GetPropertyPrototype(ctx, this_value);
Casts a trying to access undefined property issue. If I modify the previous code into
It works and
Both return TRUE, but when I do
console.log(Point.emptyPoint.x)
I get TypeError: Expected type struct Point, got object with classid 1, Im unsure what to edit at this point to support what we need, any help would be very appreciated.
The text was updated successfully, but these errors were encountered: