Re: [MSEide-MSEgui-talk] Compilation error with FPC 3.2.0

2019-04-25 Thread fredvs
Hello Graeme.

IMHO, the guilty is here, in msedisignparser.pas
(Sadly I did not find any example how to use TParameterFlag.
The goal is to ignore first parameter if fpc >= 3.2.x)


procedure getmethodparaminfo(const atype: ptypeinfo; 
 var info: methodparaminfoty);
begin
...
  for int1:= 0 to paramcount - 1 do begin
  with params[int1] do begin

   Here flags must be adapted for fpc 3.2.0
 
  flags:= tparamflags(
 {$ifde mse_fpc_3_2}wordset{$else}byteset{$endif}(pbyte(po1)^));
   inc(po1,{$ifdef mse_fpc_3_2}2{$else}1{$endif});

 ...




--
Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/


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


Re: [MSEide-MSEgui-talk] Compilation error with FPC 3.2.0

2019-04-25 Thread fredvs
> near the bottom of the page is a link to the development page

Ooops, indeed, all what needed is there.

Thanks.



--
Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/


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


Re: [MSEide-MSEgui-talk] Compilation error with FPC 3.2.0

2019-04-25 Thread Patrick Goupell


On 4/24/19 10:06 PM, Fred van Stappen wrote:


>The source for FPC can be downloaded from the www.freepascal.org 
 site.
> Follow the Download link on the right side of the screen.

Thanks Patrick.

But it seems that only source of official release fpc 3.0.4 can be 
downloaded on that site.


Fre;D



near the bottom of the page is a link to the development page

Or farther down under Coding is a Develoment link also.


These links may or may not get you what you want.

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


Re: [MSEide-MSEgui-talk] Compilation error with FPC 3.2.0

2019-04-25 Thread Graeme Geldenhuys
On 25/04/2019 14:30, fredvs wrote:
>> for pfHidden in the parameter flags and ignore them.
> Not yet understood but maybe only changing a parameter should do the trick.

You followed exactly what I would have done. Searching the source code
for TParamFlag and see what it does with it.

>From the FPC wiki it seems that if you iterate or something though the
available parameters, you now need to filter out pfHidden and pfSelf
parameters if you are not interested in them. So for MSEide that would
be a IFDEF for 3.2.0 and greater handling those new pfXXX parmeters by
skipping them.

Obviously, this is all theoretical as I haven't looked at the actual
MSEide code at all, so don't know what it does with TParamFlag at the
moment. If all else fails, embrace open source and take a sneak peek at
Lazarus's CodeTools code too. I would imagine they also had to adjust
their code generation for FPC 3.2.0 and later.

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


Re: [MSEide-MSEgui-talk] Compilation error with FPC 3.2.0

2019-04-25 Thread fredvs
Hello Graeme.

> >
> http://wiki.freepascal.org/User_Changes_Trunk#TParamFlag_extended_for_hidden_parameters

Ha, you touch something there.

A "search in directories" reveal that tparamflag is only used in
msedesignparser.pas (from where come the problem).

So now the goal is to understand how to use the new tparamflag for fpc
3.2.x.

For "TParamFlag extended for hidden parameters" they say:
> Remedy: Adjust code that relies on the amount of elements contained in
> TParamFlag (e.g. case-statements or array indices) > and also code that
> relies on the size of TParamFlags being 1 (SizeOf(TParamFlags) should be
> used instead).

And a few later:
For "Parameters of method pointer variables contain hidden parameter"
> Remedy: Depending on your code either handle the new parameters or check
> for pfHidden in the parameter flags and ignore them.

Not yet understood but maybe only changing a parameter should do the trick.

Fre;D



--
Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/


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


Re: [MSEide-MSEgui-talk] Compilation error with FPC 3.2.0

2019-04-25 Thread Fred van Stappen

> With 3.2.0 something obviously changed that "self" parameter is now
> treated as a normal parameter, and not the hidden parameter that FPC injects.

Aie, mama mia ;-(
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Compilation error with FPC 3.2.0

2019-04-25 Thread Graeme Geldenhuys
On 25/04/2019 13:06, Graeme Geldenhuys wrote:
> This might be the cause of the problem. It is listed under FPC's
> possible code breaking changes for 3.2.0 (what used to be Trunk).
> 
> 
> http://wiki.freepascal.org/User_Changes_Trunk#TParamFlag_extended_for_hidden_parameters

See also section "Parameters of procedure variables contain hidden
parameters"


http://wiki.freepascal.org/User_Changes_Trunk#Parameters_of_procedure_variables_contain_hidden_parameters


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


Re: [MSEide-MSEgui-talk] Compilation error with FPC 3.2.0

2019-04-25 Thread Graeme Geldenhuys
On 25/04/2019 12:56, fredvs wrote:
> procedure onexec2($self: Pointer; const sender: Tobject); ---> that is not
> normal.
> 
> What are the big changes of fpc 3.0.4 vs 3.2.0 ?
> 
> Very strange to get 2 different results with same code but different
> compilers.


OK, I'm not an expert at this, but I do know that every methods is sent
a hidden "self" parameter. It seems with the code generator and FPC
3.0.4 and earlier, it ignored that self parameter because FPC takes care
of that for you.

With 3.2.0 something obviously changed that "self" parameter is now
treated as a normal parameter, and not the hidden parameter that FPC
injects.


This might be the cause of the problem. It is listed under FPC's
possible code breaking changes for 3.2.0 (what used to be Trunk).


http://wiki.freepascal.org/User_Changes_Trunk#TParamFlag_extended_for_hidden_parameters


Some other release notes of interest:
  http://wiki.freepascal.org/FPC_New_Features_Trunk
  http://wiki.freepascal.org/User_Changes_3.0.4


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


Re: [MSEide-MSEgui-talk] Compilation error with FPC 3.2.0

2019-04-25 Thread fredvs
> He then confirmed that IFI is now a requirement. 

In mseifiglob, needed to compile mseide:


{$ifdef mse_no_ifi}
 {$error 'MSEifi support required, please do not compile with
"-dmse_no_ifi"'}
{$endif}



--
Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/


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


Re: [MSEide-MSEgui-talk] Compilation error with FPC 3.2.0

2019-04-25 Thread fredvs
Hello Graeme.

Thanks for the infos about IFI, I will study it.

I did some tests.

Using your fixes and compiling mseide with fpc 3.0.4.:
I did create a new project, with one form and one button, and assigning, via
object inspector, "onexec" procedure to button.onecexute:

 



You may see that the auto-generated code is procedure onexec(const sender:
Tobject), that is normal.


But using same code with your fixes and compiling mseide with fpc 3.2.0.:
And create a same new project, with one form and one button, and assigning,
via object inspector, "onexec2" procedure to button.onecexute:

 

Here you may see that the code generated via the object inspector is
different:
procedure onexec2($self: Pointer; const sender: Tobject); ---> that is not
normal.

What are the big changes of fpc 3.0.4 vs 3.2.0 ?

Very strange to get 2 different results with same code but different
compilers.

Fre;D




--
Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/


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


Re: [MSEide-MSEgui-talk] Compilation error with FPC 3.2.0

2019-04-25 Thread Graeme Geldenhuys
On 25/04/2019 12:17, Fred van Stappen wrote:
> PS: Huh, but what is the goal of IFI, Google-search dont give any help.

You'll have to search the mailing list archive messages. Martin once
described it to me years ago, but I can't remember all the details.

I also know that at years ago MSEide+MSEgui could be compiled without
IFI, which I always did. But 2-3 years ago I reported to Martin that I
couldn't compile MSEide like that any more. He then confirmed that IFI
is now a requirement. Saying that, I did notice that the MSEgui code
still has a lot of IFDEFs for IFI, but I gather is now obsolete. I guess
this needs to be confirmed too... by trying again to compile MSEide
without IFI enabled. I did not test that last night.

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


Re: [MSEide-MSEgui-talk] Compilation error with FPC 3.2.0

2019-04-25 Thread Fred van Stappen
Hello Graeme.

> And are we certain that my changes are the cause of those issues?

I will jump into it this night.

PS: Huh, but what is the goal of IFI, Google-search dont give any help.

Fre;D


De : Graeme Geldenhuys 
Envoyé : jeudi 25 avril 2019 13:01
À : mseide-msegui-talk@lists.sourceforge.net
Objet : Re: [MSEide-MSEgui-talk] Compilation error with FPC 3.2.0

On 25/04/2019 11:52, Fred van Stappen wrote:
> Indeed, strange things append.

And are we certain that my changes are the cause of those issues?

What I changed was a simple method signature related to an ifi interface
declaration. I thought that IFI is only for remote application and
display purposes.

What would IFI have to do with the Object Inspector and code generator???


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
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Compilation error with FPC 3.2.0

2019-04-25 Thread Graeme Geldenhuys
On 25/04/2019 11:52, Fred van Stappen wrote:
> Indeed, strange things append.

And are we certain that my changes are the cause of those issues?

What I changed was a simple method signature related to an ifi interface
declaration. I thought that IFI is only for remote application and
display purposes.

What would IFI have to do with the Object Inspector and code generator???


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


Re: [MSEide-MSEgui-talk] Compilation error with FPC 3.2.0

2019-04-25 Thread Fred van Stappen
Hello code dz.

Indeed, strange things append.
After creating a new project with a single form an a button, assigning 
button1.onexec method generate strange code:

unit main;
...
type
 tmainfo = class(tmainform)
   tbutton1: tbutton;
   procedure onexec($self: Pointer; const sender: TObject);
 end;
...
implementation
...
procedure tmainfo.onexec($self: Pointer; const sender: TObject);
begin
close;
end;
end.

_

See procedure onexec: > what is that "$self: Pointer" ?

Fre;D


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


Re: [MSEide-MSEgui-talk] Compilation error with FPC 3.2.0

2019-04-25 Thread Graeme Geldenhuys
On 25/04/2019 06:17, code dz wrote:
> seems this patch is not enough
> try create a gui app , add an event , and you will see some thing like

I compiled the ide and opened my usual projects, compiled those projects
and it was fine for that purpose. Then again, I don't use MSEide to
develop MSEgui application, so the Object Inspector was not explicitly
tested.

I'll take another look at this tonight. Thanks for letting me know.


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