PDA

View Full Version : Menu o.parentMenu error on showAt



boblite
16 Sep 2010, 1:40 AM
I've got a simple row context menu on a grid panel, which should show at the specified coordinates. For some reason, the showAt function errors with "Object doesnt support this property or method" error.

Within showAt, o.parentMethod is a numeric value (one of the coordinates), however this appears to be if the menu is shown against an element. Hence o.parentMenu.getEl() on an int produces the error.

Can anyone advise? Is this a config error or a bug?



grid.addListener('rowcontextmenu', function(grid, rowIndex, e) {

var xy = e.getXY();

e.stopEvent();

new Ext.menu.Menu({
items: [
{ text: 'Menu Item', handler: function() {}, scope: this, iconCls: 'no-icon' }
]
}).showAt(xy[0], xy[1]);

}, this);
thanks

boblite
16 Sep 2010, 3:07 AM
Sorry chaps, my mistake. I'm having one of those days. I looked at this for ages too :(



.showAt(xy)