<div dir="auto"><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">fredvs <<a href="mailto:fiens@hotmail.com">fiens@hotmail.com</a>> schrieb am Fr., 26. Juli 2019, 09:06:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">> It would help more if you'd point me exactly at the code in question.<br>
<br>
OK, now that you see the problem, here the code in mse-ide project:<br>
<br>
In msedesignparser.pas, procedure getmethodparaminfo: (Please take a look at<br>
the // in code that follow --> paramlist has one more entry in fpc 320)<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">I'll do my changes inline:</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
--------------------------------------------------------<br>
procedure getmethodparaminfo(const atype: ptypeinfo; <br>
var info: methodparaminfoty);<br>
<br>
function getshortstring(var po: pchar): string;<br>
begin<br>
setlength(result,byte(po^));<br>
inc(po);<br>
move(po^,pointer(result)^,length(result));<br>
inc(po,length(result));<br>
end;<br>
<br>
type<br>
pparamflags = ^tparamflags;<br>
paramrecty = record<br>
Flags : TParamFlags;<br>
end;<br>
var<br>
isfunction: boolean;<br>
int1: integer;<br></blockquote></div></div><div dir="auto"> count: Integer;</div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
po1: pchar;<br>
begin<br>
with info do begin<br>
kind:= methodkindty(-1);<br>
params:= nil;<br>
if (atype^.Kind = tkmethod) then begin<br>
with gettypedata(atype)^ do begin<br>
kind:= tmethodkindtomethodkind[methodkind];<br>
int1:= paramcount;<br>
isfunction:= methodkind = mkfunction;<br>
if isfunction then begin<br>
inc(int1);<br>
end;<br>
if isfunction or (methodkind = mkprocedure) then begin<br>
setlength(params,int1);<br>
<br>
po1:= @paramlist; <br></blockquote></div></div><div dir="auto"> count := 0;</div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
// there is now one more first parameter that must be ommited<br>
<br>
for int1:= 0 to paramcount - 1 do begin<br>
with params[int1] do begin<br></blockquote></div></div><div dir="auto">// replace previous line with:</div><div dir="auto"> with params[count] do begin</div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
flags:= tparamflags(<br>
{$ifdef mse_fpc_3_2}wordset{$else}byteset{$endif}(pbyte(po1)^));<br>
inc(po1,{$ifdef mse_fpc_3_2}2{$else}1{$endif});<br></blockquote></div></div><div dir="auto"><span style="font-family:sans-serif"> {$ifdef mse_fpc_3_2}</span><br></div><div dir="auto"><span style="font-family:sans-serif"> // skip hidden parameters ($self, $high, etc.)</span></div><div dir="auto"><span style="font-family:sans-serif"> if pfHidden in flags then</span></div><div dir="auto"><span style="font-family:sans-serif"> Continue;</span></div><div dir="auto"><span style="font-family:sans-serif"> {$endif}</span><span style="font-family:sans-serif"><br></span></div><div dir="auto"><span style="font-family:sans-serif"> Inc(count);</span></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
name:= getshortstring(po1);<br>
typename:= getshortstring(po1);<br>
if (typename = 'WideString') or (typename = 'UnicodeString') then<br>
begin<br>
typename:= 'msestring';<br>
end<br>
else begin<br>
if typename = 'LongInt' then begin<br>
typename:= 'Integer';<br>
end<br>
else begin<br>
if typename = 'Double' then begin<br>
typename:= 'Real';<br>
end;<br>
end;<br>
end;<br>
end;<br>
end;<br></blockquote></div></div><div dir="auto"> // adjust array now that we know the real count</div><div dir="auto"> SetLength(params, count);</div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
if isfunction then begin<br>
params[high(params)].typename:= getshortstring(po1);<br>
end;<br>
end;<br>
end;<br>
end;<br>
end;<br>
end;<br>
</blockquote></div></div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
To resume: if somebody knows how to not add by default the first $self<br>
parameter in paramlist, I vote for that solution.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">The above changes should help. </div><div dir="auto"><br></div><div dir="auto">Regards, </div><div dir="auto">Sven</div></div>