Hi All,
Sorry for asking such a basic question, but I’m having a problem understanding how I should be setting up my Menu system. For a start I assume the code needs to go into my onSolutionOpen method. But my main problem is that I copied the example from the help addMenuItem and I just get masses of errors. (Starting with the first line!)
var menu = plugins.window.getMenu(plugins.window.getMenuCount() - 1);
Multiple markers at this line
- The method getMenu() from the type Plugin is deprecated
- The method getMenuCount() from the type Plugin is
deprecated
Is there something I need to setup first to enable this to work?
Does Servoy have some kind of visual menu builder similar to Foxpro.
Any help would be greatly appreciated.
Caroline
Hi caroline,
I don’t use the window plugin and thus I cannot really help with your task. However I’d only want to point out that what you’re getting are more of a warning than a real error. The fact that the methods are deprecated does not automatically imply you can’t use them, albeit probably there’s a better way to achieve what you’re trying.
Hi studiomiazzo,
Could I ask what you do use if not the window plugin?
Hi Caroline,
If you want to edit the menubar or create your own popup menu’s you need to use the Window plugin.
I guess the samples haven’t been updated since they implemented the changes so the samples use deprecated functions (that still work though).
But to answer your question on how to do things it would help to know what you want to accomplish.
That’s the problem with learning Servoy! You have to hunt for examples to accomplish anything.