Цитата:
Сообщение от
Russland
Табаксом не пользуюсь. Так что даже не представляю как это реализовать. Если знающие могут такое сделать - welcome.
\Classes\QueryBrowser\main
X++:
client static void main(Args _args)
{
boolean isRunFromTabax()
{
return _args.caller()
&&
classIdGet(_args.caller())==classNum(SysSetupFormRun)
&&
_args.caller().name()=='Tabax';
}
void processContext(SysContextMenu _context)
{
TreeNode node = _context.first();
Query query = QueryBrowser::treeNode2Query(node);
if(query)
new QueryBrowser().run(query);
}
void processTabax()
{
FormRun currentFormRun = _args.caller().currentFormRun();
FormDataSource ds;
if (currentFormRun)
ds = currentFormRun.dataSource();
if (ds)
new QueryBrowser().run(ds.query());
else
processContext(_args.caller().currentSysContextMenu());
}
;
if (isRunFromTabax())
processTabax();
else if (SysContextMenu::startedFrom(_args))
processContext(_args.parmObject());
}