ну и в дагонку методам pick (может кому пригодится

)..
в своё время нужны были методы, которые вываливают список EDT, Forms и MainMenu.
т.к. в стандарте таковых не нашел добавил следующие методы в класс Global:
Ax3.0 sp3
1.
список EDT:
X++:
static int pickExtDataTypes()
{
Object formRun;
container names;
int i;
Dictionary dict = new Dictionary();
DictType dictType;
#ResAppl
;
formRun = classFactory.createPicklist();
formRun.init();
for (i=1; i <= dict.typeCnt(); i++)
{
dictType = new DictType(dict.typeCnt2Id(i));
names += dictType.name();
}
formRun.choices(names, #ImageEDT);
formRun.caption("EDT");
formRun.run();
formRun.wait();
if (formRun.choice())
{
return dict.typeName2Id(formRun.choice());
}
return 0;
}
2.
Список форм.
X++:
static FormName pickForms()
{
Object formRun;
container names;
TreeNode treeNode;
TreeNode treeNodeChild;
#ResAppl
#AOT
;
treeNode = TreeNode::findNode(#FormsPath);
treeNodeChild = treeNode.AOTfirstChild();
formRun = classFactory.createPicklist();
formRun.init();
while (treeNodeChild)
{
names += treeNodeChild.treeNodeName();
treeNodeChild = treeNodeChild.AOTnextSibling();
}
formRun.choices(names, #ImageForm);
formRun.caption("Forms");
formRun.run();
formRun.wait();
if (formRun.choice())
{
return formRun.choice();
}
return '';
}
3.
Список пунктов главного меню
X++:
static MenuName pickMenusMain()
{
Object formRun;
container names;
TreeNode treeNode;
TreeNode treeNodeChild;
SysDictMenu dictMenu;
#ResAppl
#AOT
#Admin
;
treeNode = TreeNode::findNode(#MenusPath + '\\' + #MainMenu);
treeNodeChild = treeNode.AOTfirstChild();
formRun = classFactory.createPicklist();
formRun.init();
while (treeNodeChild)
{
dictMenu = SysDictMenu::newMenuName(#MainMenu + '\\' + treeNodeChild.treeNodeName());
names += dictMenu.label();
treeNodeChild = treeNodeChild.AOTnextSibling();
}
formRun.choices(names, #ImageMenuMain);
formRun.caption("MainMenu");
formRun.run();
formRun.wait();
if (formRun.choice())
{
return formRun.choice();
}
return '';
}