[fpc-pascal] TParamFlags and fpc 3.2.0.
fredvs
fiens at hotmail.com
Fri Jul 26 14:50:06 CEST 2019
Hello Sven.
I did try your code but it has still problems.
Here the result I get:
procedure onexec(var elfPointer
...
procedure tmainfo.onexec(var elfPointer
It should be:
procedure onexec(const sender: TObject);
...
procedure tmainfo.onex(const sender: TObject);
There is something strange in the behavior of "if pfHidden in flags then".
It is the reason why, after many try, I stop to use filter in TParamFlags.
In last mse commit it keep all default parameters and do the filter when
parsing the method-code in the editor.
It works perfectly.
And to fix the parameter-matcher, a work-around ignore the first parameter
like this:
function parametersmatch(const a: ptypeinfo; const b: methodparaminfoty):
boolean;
var
a1: methodparaminfoty;
{$if FPC_FULLVERSION > 030200}
params1: paraminfoarty;
x : integer;
{$endif}
begin
getmethodparaminfo(a,a1);
{$if FPC_FULLVERSION > 030200}
setlength(params1,length(a1.params)-1);
for x:=0 to length(params1) -1 do
params1[x] := a1.params[x+1];
a1.params := params1;
{$endif}
result:= parametersmatch1(a1,b);
end;
So, mse-ide side, with last commit, all is fixed, mse is still in the game
and is fpc > 3.1.0 compatible.
https://github.com/mse-org/mseide-msegui/commit/44f515f90ba5b8c553c7b5b52d845e870e3c9de3
But, imho, there is problem with the behavior of fpc-ptypeinfo and filter in
TParamFlags.
Dont worry, I will not annoy you with this.
Many thanks Sven and your help is highly appreciated.
Fre;D
-----
Many thanks ;-)
--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
More information about the fpc-pascal
mailing list