# Error on all popupmenu's in 6.1

**URL:** https://forum.servoy.com/t/error-on-all-popupmenus-in-6-1/16267
**Category:** Classic Servoy
**Created:** [July 27, 2012, 2:53pm UTC](https://forum.servoy.com/t/error-on-all-popupmenus-in-6-1/16267 "2012-07-27T14:53:57Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Kaptan](https://avatars.discourse-cdn.com/v4/letter/k/a9adbd/32.png) [@Kaptan](https://forum.servoy.com/u/Kaptan)
#### Post date: [July 27, 2012, 2:53pm UTC](https://forum.servoy.com/t/error-on-all-popupmenus-in-6-1/16267/1 "2012-07-27T14:53:57Z")

</div>

I’m getting an error on all plugins.window.createPopupMenu() instances in servoy 6.1.

“Can’t find method com.servoy.extensions.plugins.window.menu.AbstractMenu.js\_addMenuItem(string,function,null,string,boolean,null)”

I’ve tried several things, but keep on getting the error. I was wondering if anybody else is getting this? Solution works fine in 6.0.x but in 6.1 suddenly all popupmenu’s stopped working.

---

<div class="post-metadata">

### Author: ![Andrei\_Costescu](https://avatars.discourse-cdn.com/v4/letter/a/e36b37/32.png) [@Andrei\_Costescu](https://forum.servoy.com/u/Andrei_Costescu)
#### Post date: [July 30, 2012, 12:37pm UTC](https://forum.servoy.com/t/error-on-all-popupmenus-in-6-1/16267/2 "2012-07-30T12:37:45Z")

</div>

That last argument is supposed to be a number.  
Either remove it alltogether, or use an number there (-1 for example) instead of null.

---

<div class="post-metadata">

### Author: ![Andrei\_Costache](https://avatars.discourse-cdn.com/v4/letter/a/4af34b/32.png) [@Andrei\_Costache](https://forum.servoy.com/u/Andrei_Costache)
#### Post date: [July 30, 2012, 3:05pm UTC](https://forum.servoy.com/t/error-on-all-popupmenus-in-6-1/16267/3 "2012-07-30T15:05:44Z")

</div>

> Kaptan:  
> I’m getting an error on all plugins.window.createPopupMenu() instances in servoy 6.1.
> 
> “Can’t find method com.servoy.extensions.plugins.window.menu.AbstractMenu.js\_addMenuItem(string,function,null,string,boolean,null)”
> 
> I’ve tried several things, but keep on getting the error. I was wondering if anybody else is getting this? Solution works fine in 6.0.x but in 6.1 suddenly all popupmenu’s stopped working.

Sem, we just modified the window plugin so your code should not throw an error now. This will be available in the next public release of 6.1.  
But as Andrei pointed out already, the last argument should be an int (you can use MenuItem.ALIGN\_\* constants).

Regards,  
Andrei

---

<div class="post-metadata">

### Author: ![Kaptan](https://avatars.discourse-cdn.com/v4/letter/k/a9adbd/32.png) [@Kaptan](https://forum.servoy.com/u/Kaptan)
#### Post date: [July 30, 2012, 5:15pm UTC](https://forum.servoy.com/t/error-on-all-popupmenus-in-6-1/16267/4 "2012-07-30T17:15:10Z")

</div>

Ok thx,

I’ve also rewritten my code a bit, I’m not getting an error anymore in the current release. I got a bit scared of the errors, since the code was working before 6.1. But all is ok now ![:)]( "Smile")
