How to convert classname as string to a class?

后端 未结 4 1957
春和景丽
春和景丽 2021-01-03 03:42

I have classnames in a stringlist. For example it could be \'TPlanEvent\', \'TParcel\', \'TCountry\' etc.

Now I want to find out the sizes by looping the list.

4条回答
  •  温柔的废话
    2021-01-03 04:12

    1. You have to use FindClass to find the class reference by its name. If class is not found, then the exception will be raised.
    2. Optionally, you have to call RegisterClass for your classes, if they are not referenced explicitly in the code.

提交回复
热议问题