I’d like to compare the “state” of two components, say Comp1: TSomeComponent and Comp2: TSomeComponent, i.e. I want to compare the values of all the published properties of the two components. Some of the properties are indexed, like the TListBox.Items property. Is there an easy way to do this? Do I have to invoke some iterating RTTI code?
I’d like to compare the state of two components, say Comp1: TSomeComponent and Comp2:
Share
An easy way would be to serialize them both with
WriteComponentand compare the resulting strings. Note, however, that this would compare onlypublished, notpublic, properties. But that is what you say you need, so…Note that this would make, say, the order of the indexed properties significant. That may or may not be what you want.