Hi all,
It looks like removing some menu’s acting different in debugclient then in smartclient using the window plugin.
In both clients the menu count returns 7 using:
plugins.window.getMenuBar().getMenuCount()
Problem is that this works in debugclient, but not in the smartclient:
plugins.window.getMenuBar().removeMenu(2,4,5,6);
In smartclient this error occurs:
ERROR - Debug - A _menu with index 5 doesn't exist.
Any idea how to remove the correct menu’s in the smartclient?
Servoy 5.2.9
PostgreSQL 9.0.4-1
I did found a workaround for the smartclient:
if(application.isInDeveloper()){
plugins.window.getMenuBar().removeMenu(2,4,5,6);
}
else {
plugins.window.getMenuBar().removeMenu(2);
plugins.window.getMenuBar().removeMenu(3);
plugins.window.getMenuBar().removeMenu(3);
plugins.window.getMenuBar().removeMenu(3);
}
But it sure would be nice if .removeMenu(2,4,5,6) would work on both sides ![Smile :)]()
If I remember correctly I had the same issue a while ago and I solved it by removing in reverse order: 6 ,5, 4, 2.
Just out of my head, check it out.
i fixed this for 6 (will backport to 5)
then you don’t have to use that workaround