Re: [fpc-devel] {$M+} and forward declarations do not work

2005-12-20 Thread Graeme Geldenhuys
Peter Vreman wrote: Please submit always complete code. Now we need to guess what is wrong and in a lot of cases we can't reproduce it with our own code like in this situation. The code below works perfectly: Sorry about that. Strangely enough, your example runs fine here as well. Below is

Re: [fpc-devel] {$M+} and forward declarations do not work

2005-12-20 Thread Graeme Geldenhuys
Here is the command line version of my app. -- program project1; {$mode objfpc}{$H+} uses Classes, SysUtils, TypInfo; type {$M+} TMyTestObject = class; {$M-} TSomeOtherClass = class(TObject) private FName: string; public

Re: [fpc-devel] {$M+} and forward declarations do not work

2005-12-20 Thread Graeme Geldenhuys
And this is the error I get: C:\Programming\Tests\GetPropList\Laz2project1.exe An unhandled exception occurred at $0043AAEB : EAccessViolation : Access violation $0043AAEB GETTYPEDATA, line 478 of ../objpas/typinfo.pp $0043AFF1 GETPROPLIST, line 683 of ../objpas/typinfo.pp $004010BA

Re: [fpc-devel] {$M+} and forward declarations do not work

2005-12-20 Thread Peter Vreman
Here is the command line version of my app. lCount := GetPropList(O.ClassInfo, lPropFilter, nil, false); Here is the small difference. I used TypeInfo() that returns a direct reference to the RTTI. Your code uses ClassInfo that will load the pointer from the Class structure. The pointer

Re: [fpc-devel] {$M+} and forward declarations do not work

2005-12-20 Thread Graeme Geldenhuys
Peter Vreman wrote: Here is the command line version of my app. lCount := GetPropList(O.ClassInfo, lPropFilter, nil, false); Here is the small difference. I used TypeInfo() that returns a direct reference to the RTTI. Your code uses ClassInfo that will load the pointer from the Class

[fpc-devel] GetPropList and order of properties returned

2005-12-20 Thread Graeme Geldenhuys
Hi, What are the rules regarding the order of a unsorted list of published properties using the GetPropList method, when inheritance has been used. I had unit tests from a Delphi app that detected this difference. Below is the results from Delphi and FPC. The first set has been compiled

Re: [fpc-devel] GetPropList and order of properties returned

2005-12-20 Thread Michael Van Canneyt
On Tue, 20 Dec 2005, Graeme Geldenhuys wrote: Hi, What are the rules regarding the order of a unsorted list of published properties using the GetPropList method, when inheritance has been used. I had unit tests from a Delphi app that detected this difference. Below is the results from

Re: [fpc-devel] GetPropList and order of properties returned

2005-12-20 Thread Peter Vreman
On Tue, 20 Dec 2005, Graeme Geldenhuys wrote: Hi, What are the rules regarding the order of a unsorted list of published properties using the GetPropList method, when inheritance has been used. I had unit tests from a Delphi app that detected this difference. Below is the results from

Re: [fpc-devel] GetPropList and order of properties returned

2005-12-20 Thread Graeme Geldenhuys
Michael Van Canneyt wrote: There is no set rule. If I remember correctly, the order changed in Delphi, because I seem to remember that it was as FPC (D5 or so). Might have been before D5 then, I don't know. The application/framework I am porting runs the same set of unit tests under D5-D7

Re: [fpc-devel] GetPropList and order of properties returned

2005-12-20 Thread Martin Schreiber
Another incompatibility: FPC reports multiple published properties multiple, Delphi /Kylix ones. FPC 2.0.2: Total property Count: 3 Property 1: IntProp Property 2: IntProp Property 3: IntProp --- Kylix 3: Total property Count: 1 Property 1: IntProp --- program project1;