FastScrip - CallMethod

edited 12:46PM in FastScript
Hi.

When i put the AddMethod for fastscript in CB2009, ocurr the error:
[BCC32 Error] Main.cpp(26): E2285 Could not find a match for 'TfsScript::AddMethod(const char *,Variant (_fastcall * (_closure )(TObject *,TMetaClass *,const AnsiString,Variant &))(TObject *,TMetaClass *,const AnsiString,Variant &))'.

In CB5 and Delphi2009 this error not ocurr.

Anyone know how to resolve this, i tried a lot of things, but nothing functioned.

The code is very simple:

__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
fsScript1->AddMethod("procedure CPPFUNC(string:x) ",&(this)->Method);
}
//
Variant __fastcall TForm1::Method(System::TObject* Instance, TMetaClass* ClassType, const AnsiString MethodName, Variant &Params)
{
return NULL;
}
//

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.