Tommi Prami 130 Posted January 9, 2020 Did not find example for this. Basically I need some kind of methods that are UpdatePropertyIfAvaibalble(const AInterface interface; const APropertyName: string; const AValue: string); UpdatePropertyIfAvaibalble(IMyInterfaceThingy, 'Id', 'IDSTRINGVALUE'); And overloads for different data types. Datatype is known. Cool if would check the datatype of property tough, is it compatible... Why I need this is that there is XML interface which does not have inheritance, so most nodes have all the same properties but not inherited from same interface so can't use that (woulöd have been too easy :D). So using RTTI would help a ton. Never done that with interfaces so not sure where to start. -Tee- Share this post Link to post
Stefan Glienke 2002 Posted January 10, 2020 (edited) There is no RTTI available for interface properties - you have to refer to them via the setter method name. And even that only works if the interface has {$M+} or inherits from IInvokable. Edited January 10, 2020 by Stefan Glienke Share this post Link to post