Hello Everyone,
I have write something to try to define a object type as object handel type:
c++
class URHO3D_API CurlWrapper {
...
static void ConstructCurl(CurlWrapper* ptr) {
new(ptr) CurlWrapper();
}
...
engine->RegisterObjectType("Curl", sizeof(CurlWrapper), asOBJ_VALUE | asOBJ_POD | asOBJ_APP_CLASS_C);
engine->RegisterObjectBehaviour("Curl", asBEHAVE_CONSTRUCT, "void f()", asFUNCTION(ConstructCurl), asCALL_CDECL_OBJLAST);
engine->RegisterObjectMethod("Curl", "bool Download(const String&in,const String&in)", asMETHODPR(CurlWrapper, Download,(const String&,const String&), bool), asCALL_THISCALL);
engine->RegisterObjectMethod("Curl", "bool Get(const String&in)", asMETHODPR(CurlWrapper, Get,(const String&), bool), asCALL_THISCALL);
angelscript:
Curl@ c=Curl();
I got a error of: Object handle is not supported for this type, so is it possible or something necessary missed?
thanks.