-
24 Nov 2009 2:53 AM #1
[FIXED] MenuItem delete on click of the MenuiTem icon throwing a null pointer ex
[FIXED] MenuItem delete on click of the MenuiTem icon throwing a null pointer ex
Hi,
I delete a MenuItem from a Menu, onclick of the MenuItem icon. The MenuItem is getting deleted, but throwing a null pointer exception in the deactivate() method of the Item class.
Here is the sample code snippet:
final CustomMenuItem mySavedViewOneMenuItem = new CustomMenuItem( "menu1" );
final CustomMenuItem menu2 = new CustomMenuItem( "menu2" );
Menu menu = new Menu();
mySavedViewOneMenuItem.setIcon( closeIcon );
menu.insert( mySavedViewOneMenuItem, 0 );
menu.insert( menu2, 1 );
item1.setMenu( menu );
mySavedViewOneMenuItem.addIconClickListener( new Listener<BaseEvent>()
{
@Override
public void handleEvent( BaseEvent be )
{
Menu parentMenu = mySavedViewOneMenuItem.getParentMenu();
mySavedViewOneMenuItem.removeFromParent();
}
} );
Thanks in advance.
-
24 Nov 2009 4:37 AM #2
-
24 Nov 2009 5:23 AM #3
Hi,
What do you mean by fixed in SVN.
where can I get the fixed version.
-
24 Nov 2009 5:25 AM #4
It is fixed in SVN. The fix is not released.
You can get SVN access with a support subscription: http://www.extjs.com/store/gxt/#support-table
-
19 Dec 2009 7:25 PM #5
MenuItem delete on click of the MenuiTem icon throwing a null pointer exception
MenuItem delete on click of the MenuiTem icon throwing a null pointer exception
ah I see it is not in the release yet... BTW this bug seems to be in extjs 3 as well
here is the fix if you cant access the svn:
change original:
beforeDestroy : function ifthis.rendered this.keyNav.disable; // throws NULL Exception this.keyNav = null; Ext.destroy this.leftClickRpt, this.rightClickRpt, this.monthPicker, this.eventEl, this.mbtn, this.todayBtn ;
to:
beforeDestroy : function ifthis.rendered ifthis.keyNav = null this.keyNav.disable; this.keyNav = null; Ext.destroy this.leftClickRpt, this.rightClickRpt, this.monthPicker, this.eventEl, this.mbtn, this.todayBtn ;
-
21 Dec 2009 2:25 AM #6
It was released already (Gxt 2.1.0).
But I guess you maybe talking about ext-js...
In this case, you might want to post it in their forum.
Regards,
Michel.
Thank you for reporting this bug. We will make it our priority to review this report.


Reply With Quote