How to convert classname as string to a class?

后端 未结 4 1966
春和景丽
春和景丽 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:18

    If your classes derive from TPersistent you can use RegisterClass and FindClass or GetClass . Otherwise you could write some kind of registration mechanism yourself.

提交回复
热议问题