SRL Archive - OSR Help

WaitFunc and arguments


bg5

2011-12-22 12:20:33

I have some stupid problem with WaitFunc. I can't put in it function with any argument. For example:

Function MyFunction: Boolean; 

WaitFunc(@MyFunction,100,1000);

Compiled well. But if I add any argument to function:

Function MyFunction(a:integer): Boolean; 

WaitFunc(@MyFunction(3),100,1000);

Type mismatch error.

Also I tried:

WaitFunc((@MyFunction(3)),100,1000);
WaitFunc(@(MyFunction(3)),100,1000);

Neither works. How to do that?

BraK

2011-12-22 12:26:13

Put it inside another boolean function

Function What : Boolean;
begin
Result := DoWhat(100,200, True);
end;

Waitfunc(@what, 100, 500);