AddMethod problem
Can anybody help me with the error message i get from CBuilder and Fastscript 1.9.
i have declare in the __published
Variant __fastcall CallMethod(TObject *Object,TMetaClass *MetaClass,
AnsiString FunctionName, Variant &Params);
in my cpp file i have
Variant __fastcall TForm1::CallMethod(TObject *Object,
TMetaClass *MetaClass, AnsiString FunctionName, Variant &Params)
{
..... some code
}
and then i try to call AddMethod with
fsScript1->AddMethod("function CPPFUNC(s:String, i:Integer):void", CallMethod);
when i compile my cbuilder program i get
[C++ Error] Unit1.cpp(43): E2285 Could not find a match for 'TfsScript::AddMethod(char *,void)'
Any ideas?
i have declare in the __published
Variant __fastcall CallMethod(TObject *Object,TMetaClass *MetaClass,
AnsiString FunctionName, Variant &Params);
in my cpp file i have
Variant __fastcall TForm1::CallMethod(TObject *Object,
TMetaClass *MetaClass, AnsiString FunctionName, Variant &Params)
{
..... some code
}
and then i try to call AddMethod with
fsScript1->AddMethod("function CPPFUNC(s:String, i:Integer):void", CallMethod);
when i compile my cbuilder program i get
[C++ Error] Unit1.cpp(43): E2285 Could not find a match for 'TfsScript::AddMethod(char *,void)'
Any ideas?
Comments
fsScript1->AddMethod("function CPPFUNC(s:String, i:Integer):void", &CallMethod);