Вниз
Скачать: CL | DM;

Получить из имени класса сам класс   Найти похожие ветки 

← →
Pearled ©   (2006-02-20 16:41) [0]

Подскажите как имея строку - название класса получить ссылку на сам класс. Например из "TfmMain" - TfmMain


← →
Johnmen ©   (2006-02-20 16:45) [1]

ClassName?


← →
Ega23 ©   (2006-02-20 16:46) [2]


TObject.ClassName

Returns a string indicating the type of the object instance (as opposed to the type of the variable passed as an argument).

class function ClassName: ShortString;

Description

Use ClassName to find the name (such as ’TButton’) of an object’s type. This is useful for differentiating object instances that are assigned to a variable that has the type of an ancestor class. ClassName returns a string indicating the actual type of the object, rather than a string containing the type of the declared variable.

When reporting exception-handling errors on a particular object, the on statement uses ClassName to do a string comparison of classes.


Оно?


← →
Джо ©   (2006-02-20 16:46) [3]

FindClass, GetClass. В результате, если класс зарегистрирован возвратит TPersistenClass.


← →
RO   (2006-02-20 16:48) [4]

FindClass()


← →
Pearled ©   (2006-02-21 08:11) [5]

Всем спасибо.
FindClass() решил проблему.



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.44 MB
Время: 0.037 c
1-1139222166
DelphiLexx
2006-02-06 13:36
2006.03.12
Профайлер для Delphi


15-1139834037
X9
2006-02-13 15:33
2006.03.12
Помогите с алгеброй


3-1137760737
Stanislav
2006-01-20 15:38
2006.03.12
Работа со временной таблицей


4-1135254028
ArtemESC
2005-12-22 15:20
2006.03.12
Как выйти в меню выбора пользователя?


15-1140292750
Nick Denry
2006-02-18 22:59
2006.03.12
Что такое "снижение процентной ставки"




   Наверх