static void Job47(Args _args)
{
str path,stx;
TreeNodeIterator iter;
TreeNode treeNode, treeNodeToRelease;
Map dictMenuDisplay;
FormName formName;
MenuItemName menuItemName;
container conMenu;
int i,n;
;
for (n=1;n<=100;n++)
{
info(strfmt("iter:%1",n));
path ="Menu Items\\Display";
dictMenuDisplay = new Map(Types::String,Types::Container);
treenode = Treenode::findNode(path);
iter = treenode.AOTiterator();
treenode = iter.next();
while (treenode)
{
formName = treenode.AOTgetProperty("Object");
menuItemName = treenode.AOTname();
if (dictMenuDisplay.exists(formName))
{
conMenu = dictMenuDisplay.lookup(formName);
conMenu = conIns(conMenu,conlen(conMenu)+1,menuItemName);
dictMenuDisplay.insert(formName,conMenu);
}
else
dictMenuDisplay.insert(formName,[menuItemName]);
// treenode = iter.next();
if(treeNodeToRelease && SysTreeNode::isApplObject(treeNode))
{
treeNodeToRelease.treeNodeRelease();
treeNodeToRelease=null;
}
if(SysTreeNode::isApplObject(treeNode))
{
treeNodeToRelease=treeNode;
}
treeNode=iter.next();
}
}
}
I get the error "overflow in internal run stack",the code runs till 86th iteration correctly, help...