Why did the myContextMenu.hideItem not work?

Sir,
With the sample below
dhtmlx.com/docs/products/dhtmlxM … ntext.html

I have add code myContextMenu.hideItem(“new”); in doOnLoad() function ,
Why did it not work on Standard Edition V5.0 I have downloaded ?

sample :
function doOnLoad() {
myContextMenu = new dhtmlXMenuObject(“contextArea”);
myContextMenu.setIconsPath(“…/common/imgs/”);
myContextMenu.renderAsContextMenu();
myContextMenu.loadStruct(“…/common/dhxmenu.xml”);
myContextMenu.hideItem(“new”);
}

Thank you

Best regards

Hello.
loadStruct is async. it is necessary to add function ().
Here you can find a tutorial about loading data:
docs.dhtmlx.com/api__link__dhtml … truct.html

Your code should look like this:
myContextMenu.loadStruct("…/common/dhxmenu.xml",function(){
myContextMenu.hideItem(“new”);
});

Thanks a lot .