AddMethod problem

edited 9:23PM in FastScript
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?



Comments

  • edited 9:23PM
    Try so:
    fsScript1->AddMethod("function CPPFUNC(s:String, i:Integer):void", &CallMethod);

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.