Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2007-02

GetPropValue and a class property

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

Hi

In the help page
http://lazarus-ccr.sourceforge.net/docs/rtl/typinfo/getpropvalue.html it mentions that it is not implemented due to missing Variant support. Is this still true? As far as I know Variant support has been in FPC for a while now.

I'm using FPC 2.0.4 and FPC 2.1.1 (latest svn).

Now my actual question: What does GetPropValue return when the property is a class?
For example I have a Country class and a Address class which holds a reference to a Country class. As far as I understand GetPropValue returns a variant. So how to I cast (or whatever needs to be done) so I can reference the actual Country instance that GetPropValue returned?

TAddress = class()
...
published
  property  Street: string read ....
  property  Country: TCountry read FCountry;
  ...
end;
Graeme Geldenhuys There's no place like S34° 03.168' E018° 49.342'

Reply by email