Forum > General

Some observations on the use of RTTI

(1/14) > >>

vfclists:
I came across this article on RTTI by Luiz Americo (where and how is he anyway?) - http://lazarusroad.blogspot.com/2010/05/discover-of-rtti.html and realized some applications of RTTI I never truly thought of.

I have been looking at RTTI in terms of setting the properties of controls, such as with the RTTI controls unit, but never in terms of passing any arbitrary data to a class in order to get its property setters and getters to operate on that data even if the property doesn't have a corresponding field in the object.

I read about how some projects which involving hooking up Lazarus to other languages like Python4Lazarus, VClua etc depend on RTTI, ExtendedRTTI etc and wonder how little of this has to do with updating controls and other UI stuff.

Is there more to RTTI than I think, and are there more examples of this kind of usage that has nothing to do with UI controls?

Have I been confusing RTTI for UI controls with the purpose and importance of RTTI in general?

egsuh:
RTTI can be linked to any property, calling its setter and getter even if there are no corresponding field. Is this what you are wondering?

vfclists:

--- Quote from: egsuh on October 07, 2024, 08:09:47 am ---RTTI can be linked to any property, calling its setter and getter even if there are no corresponding field. Is this what you are wondering?

--- End quote ---

Yes. Although it is logical when you think of it, it escaped me for a while and probably because most of the examples shown involved manipulating UI objects.

Thaddy:
My complete example on the wiki is a console demo....

vfclists:

--- Quote from: Thaddy on October 07, 2024, 02:22:27 pm ---My complete example on the wiki is a console demo....

--- End quote ---

Link? Searching for "rtti console" is not revealing it.

Navigation

[0] Message Index

[#] Next page

Go to full version