Показать сообщение отдельно
Старый 01.10.2009, 11:34   #6  
Logger is offline
Logger
Участник
Лучший по профессии 2015
Лучший по профессии 2014
 
3,984 / 3273 (117) ++++++++++
Регистрация: 12.10.2004
Адрес: Москва
Записей в блоге: 2
Цитата:
Сообщение от AndyD Посмотреть сообщение
Чуть более универсально, но тупо
X++:
client static void GetControlProperties(FormControl _control)
{
    DictClass   dictClass;
    DictMethod  dictMethod;
    int         i;
    Types       returnType;
    str         fheader;
    ;
    if (_control)
    {
        dictClass = new DictClass(_control.handle());
        if (dictClass)
        {
            SetPrefix(_control.name());
            info(strfmt('Control Name: "%1"\nClass Name: "%2"', _control.name(), dictClass.name()));
            for (i = 1; i <= dictClass.objectMethodCnt(); i++)
            {
                dictMethod = dictClass.objectMethodObject(i);
                if (dictMethod.propertyMethod())
                {
                    if(dictMethod.returnType() == Types::USERTYPE)
                        returnType = new DictType(dictMethod.returnId()).baseType();
                    else
                        returnType = dictMethod.returnType();
                    if (returnType != Types::void && returnType != Types::Class && 
                        returnType != Types::Record && returnType != Types::Container)
                    {
                        fheader = infolog.helpGenerator().funcHeader('Kerndoc://classes/'+dictClass.Name()+'/'+dictMethod.name());
                        if (!match("(.+\\ +\\[", fheader))
                            info(strfmt('Property:"%1"\tValue: "%2"', dictMethod.name(), dictClass.callObject(dictMethod.name(), _control)));
                    }
                }
            }
        }
    }
}
Здорово !

А подскажите что делает вот эта проверка ?
X++:
if (!match("(.+\\ +\\[", fheader))
т.е. зачем она поставлена ?

Последний раз редактировалось Logger; 01.10.2009 в 11:45.