Need Help for scripted functions in PascalScript

Hi,
I can’t execute scripted functions like it is described in the page : https://github.com/remobjects/pascalscript/wiki/Using-RemObjects-Pascal-Script
I got a pointer nil in the line : Meth := TTestFunction(ce.GetProcMethod(‘TESTFUNCTION’));
Can you send me a complete sample project of this feature so I can understand please ?
Thank you.

I don’t have a sample handy but one of our testcases uses this api:

type
TTestMethod = function (s: string): string of object;

procedure TCompilerTestFunctions.CallScriptFunctionAsMethod;
var
Meth: TTestMethod;
begin
Compile('function Test(s:string): string; begin Result := '‘Test Results: ‘’+s;end; begin end.’);
Meth := TTestMethod(CompExec.GetProcMethod(‘Test’));
Check(@Meth <> nil, ‘Unable to find function’);
CheckEquals(‘Test Results: INDATA’, Meth(‘INDATA’));
end;

In dunit\CompilerTestFunctions.pas in the source repository.