Hi Fred,

On 27/04/2019 13:08, fredvs wrote:
> In last fpc 3.2.0. was added a "hidden" parameter for TParamFlags (to do
> like Java does?).
> OK but why add this new parameter as default, why not add it with a no
> default parameter to keep compatibly with earlier version?

I do agree that FPC's backward compatibility is not as good as it used
to be. I have discovered many things in the 3.x releases which broke my
software. I guess they would argue that 3.x is a major release change,
thus code breakages are expected (and somewhat allowed).

Anyway, back to the point of the hidden "self" parameter. It has always
been there, since the introduction of classes. It was simply that
TParamFlags did not have the ability to query those hidden parameters.
It seems in 3.2.0 they introduced a new parameter type so software could
query those hidden parameters if they needed, or ignore them otherwise.

>From my preliminary research, it seems Martin simply iterated though all
the available parameters, going on the expectation that hidden
parameters are never is that listed. Then generating the method
parameters for the IDE source editor, via the code generation (ie: class
completion). So I would expect we simply need to add an extra check
during that iteration and discard all pfHidden and pfSelf parameters, as
we don't need them in the generated class completion code.

Like I said, I'll take a look as soon as I can. I don't expect it to be
a difficult thing to fix.

Regards,
  Graeme

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp


_______________________________________________
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to