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
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
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
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
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
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
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
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
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
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;
10 matches
Mail list logo