views:

522

answers:

2

I'm familiar with using Delphi RTTI to access "simple" properties (ints/enums/strings, etc) but I cannot grasp how to work with Array properties.

I'm starting by looking for array equivalents for the GetPropValue/SetPropValue calls. I'd expect to see similar ones to these, but taking an extra "index" parameter, but can't seem to find anything in the typinfo unit help.

+3  A: 

Not sure if it is possible. Array properties can't be published which implies they can't have RTTI.

Also, if you look at the components in the object inspector. There are no array properties there. All array properties have custom editors (Or I must have missed some).

Gamecat
+5  A: 

Arrays and array properties can't have RTTI for them up to D2009. But when Barry Kelly spoke at the Delphi Live conference about an enhanced RTTI system that's planned for D2010, he mentioned that everything, including arrays, would have RTTI available. So this is a feature to look forward to...

Mason Wheeler
Arrays have RTTI - pretty much all types will have RTTI. "Array properties", i.e. indexed properties, not in D+1 though.
Barry Kelly
Oh, they won't? I must have misunderstood then.
Mason Wheeler