Creating a Menu system

Questions and answers for designing and implementing forms in Servoy

Creating a Menu system

Postby caroline.j » Sat Mar 10, 2012 11:07 am

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!)

Code: Select all
var menu = plugins.window.getMenu(plugins.window.getMenuCount() - 1);

Multiple markers at this line
- The method getMenu() from the type Plugin<window> is deprecated
- The method getMenuCount() from the type Plugin<window> 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
caroline.j
 
Posts: 81
Joined: Wed Feb 08, 2012 9:25 pm

Re: Creating a Menu system

Postby studiomiazzo » Sun Mar 18, 2012 2:36 pm

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.
User avatar
studiomiazzo
 
Posts: 124
Joined: Thu Jun 16, 2011 10:48 am
Location: Novara (IT)

Re: Creating a Menu system

Postby caroline.j » Sun Mar 18, 2012 4:01 pm

Hi studiomiazzo,
Could I ask what you do use if not the window plugin?
caroline.j
 
Posts: 81
Joined: Wed Feb 08, 2012 9:25 pm

Re: Creating a Menu system

Postby ROCLASI » Sun Mar 18, 2012 4:25 pm

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.
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: Creating a Menu system

Postby ccadwell » Fri Mar 22, 2013 5:42 pm

That's the problem with learning Servoy! You have to hunt for examples to accomplish anything.
ccadwell
 
Posts: 1
Joined: Wed Feb 13, 2013 7:57 pm


Return to Forms

Who is online

Users browsing this forum: No registered users and 6 guests