noeska
01-10-2008, 06:22 PM
Delphi 2005 win32
RTTI
Can i detect if an public (not published) property exists?
I use xml and rtti to add objects on runtime. Now one object can have a list of other objects only the list is a public property and not a published one.
Besides making the list a published property what options do i have?
My idea was that when i encounter an xml child tag with the name of an property of the object it would allow to add the children of that tag to items list. E.g.
<TMyObject>
<Items>
<TChildObject>
<TChildObject>
</Items>
</TMyObject>
So once MyObject is created. The items is found as child. Not it looks if items is a property exists in MyObject. If it does it goes looking for children that are added by the assumed .Add( childitem). But as Items is not published it is not found :-(
Thanks for your answers in advance.
RTTI
Can i detect if an public (not published) property exists?
I use xml and rtti to add objects on runtime. Now one object can have a list of other objects only the list is a public property and not a published one.
Besides making the list a published property what options do i have?
My idea was that when i encounter an xml child tag with the name of an property of the object it would allow to add the children of that tag to items list. E.g.
<TMyObject>
<Items>
<TChildObject>
<TChildObject>
</Items>
</TMyObject>
So once MyObject is created. The items is found as child. Not it looks if items is a property exists in MyObject. If it does it goes looking for children that are added by the assumed .Add( childitem). But as Items is not published it is not found :-(
Thanks for your answers in advance.