Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2013-11

is there a way to list out all classes defined in a unit during run time?

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Dennis Poon

I have a unit which I will incrementally add new subclasses of TCommand.

At run time, I want to get a list of subclasses of TCommand so that I can compare the where the user's required input (from network) matches the name of any TCommand.

Currently, I have to register each subclass in the initialization section of the unit.
Is there a way to list out all classes defined in a unit during run time?

Dennis

Reply by email

Michael Van Canneyt
to Dennis Poon
Dennis Poon wrote 7 lines
I have a unit which I will incrementally add new subclasses of TCommand. At run time, I want to get a list of subclasses of TCommand so that I can compare the where the user's required input (from network) matches the name of any TCommand. Currently, I have to register each subclass in the initialization section of the unit. Is there a way to list out all classes defined in a unit during run time?

Currently not.

Michael.

Reply by email