Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2006.03.12;
Скачать: 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 вся ветка

Текущий архив: 2006.03.12;
Скачать: CL | DM;

Наверх




Память: 0.47 MB
Время: 0.055 c
3-1136992175
мускул
2006-01-11 18:09
2006.03.12
Синхронизация таблиц


2-1140831170
49 Cent
2006-02-25 04:32
2006.03.12
Как недопустить текстовые символы в edit?


6-1132780992
PVasili
2005-11-24 00:23
2006.03.12
Как в XML хранить HTML?


2-1140527296
Mahab
2006-02-21 16:08
2006.03.12
JPEG


2-1140679161
nap<>
2006-02-23 10:19
2006.03.12
TFileStream