[Delphi] Find variable by name?

Hi can i find variables by name? and use them? with components i can do this:
TEdit(FindComponent('edNew')).Text := 'aa';

Open in new window

It is possible with variables? Please help me
l3m0nAsked:
Who is Participating?
 
ThommyConnect With a Mentor Commented:
No, it's not possible...

Find variable by its name
http://www.delphipages.com/forum/showthread.php?t=135466
0
 
ThommyCommented:
@SYSTAN
l3m0n knows how to find components by name!!!
What he wants is to do the same with variables...
0
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

 
overtheclock007Commented:
You can only do these is "edNew" is part of a delphi class and is published.
A a published "some thing" generts RTTI Runtime Type Information.
you can do things like list all poppus that the program as created for explem.
found delphi jedi site they have lots of exempls that you need to undestem these thing you are trying to do.

TEdit(FindComponent('edNew')).Text := 'aa';   edNew must be a published, not public.
see these article is important to undestand RTTI Runtime Type Information.
http://delphi.about.com/od/oopindelphi/a/delphirtti.htm
0
 
systanCommented:
Ok, Thommy,
I was thinking about;
uses typeinfo,
RTTi like overtheclock007s link
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.