Menu plugin issue

Hi,
I am using Servoy 3.5 and with the it2be_menubar plugin. I have added a new submenu under a menu,and when i click on that submenu,a method is called. In this method I am performing a query and depending if the query results into 0 or more rows, an if clause is performed. That is it.
If there are no rows resulting from query it goes into else and it works fine. But if i have rows resulting from query i have to close and reopen developer for the method to work properly. And the strange thing is,in the morning when i arrived to work,it worked perfectly without having to close/reopen. If i run the method from the Editor,it works fine. Could it be a bug in the menu plugin? I thank you in advance for your answer!

Hi Diana,

diana.bodnarescu:
But if i have rows resulting from query i have to close and reopen developer for the method to work properly.

You say you have to close and reopen developer to make it work properly again. But what was the problem in the first place?
Can you describe what it did when not working properly.
And showing the method here might also help.

Hi,
Thank you for your reply!
The menu is ‘Financial’ and the submenu is ‘Process purchase orders’. When selecting ‘Process purchase orders’, this method is called:

var vForm = ‘pur_process_purchase_item_lst_frm’
var vServer = ‘stb_relation’
var vTable = ‘pur_purchase_item’
var vSQL = 'SELECT * FROM ’ + vTable + ’ WHERE pur_purchase_id = ? ’
var vDS = databaseManager.getDataSetByQuery(vServer, vSQL, [null], -1)

if(vDS && vDS.getMaxRowIndex() > 0){
globals.core_NAV_showForm(vForm, ‘html’)
}
else {
plugins.dialogs.showInfoDialog( ‘i18n:STB.dialog.information’, i18n.getI18NMessage(‘STB.dialog.message.no_purchased_items’), ‘i18n:STB.dialog.ok’)
return
}

If the query results into 0 rows, the method works fine every time(it shows the dialog). If it results into 1 or more rows, the first time i select ‘Process purchase orders’ since opening the developer,the method works fine(it shows vForm). The second time i select it and the query results into 1 or more rows, instead of showing vForm, it does not do anything. But if i run the method from the Editor,it works perfectly(it shows vForm). Only if i close and reopen developer and select ‘Process purchase orders’ the method works again. Until the next time i select it, and here we go again… Can it be a it2be_menubar bug?

Hi Diana,

This topics belongs on our forum: http://www.it2be.com/index.php/forum/

But before you continue there, please check the code in your method.
A simple test btw can be that you attach your method to a button to see what happens with that.
I can see no reason why this would be a bug…