Показать сообщение отдельно
Старый 05.09.2008, 13:17   #260  
belugin is offline
belugin
Участник
Аватар для belugin
Сотрудники Microsoft Dynamics
Лучший по профессии 2017
Лучший по профессии 2015
Лучший по профессии 2014
Лучший по профессии 2011
Лучший по профессии 2009
 
4,622 / 2925 (107) +++++++++
Регистрация: 16.01.2004
Записей в блоге: 5
Небольшой баг - если название контрола или дс == названию формы, редактор не воспринимался

X++:
/// returns control from form _form with the name _name
TreeNode controlByName(TreeNode _form, str _name)
{
    TreeNodeTraverser i = new TreeNodeTraverser(_form, false);
    TreeNode node = i.next();
    while (node)
    {
        if (match(@": +name: +#"+_name+': +', node.AOTgetProperties()))
            return node;
        node = i.next();
    }
    return null;
}