09-12-2009 06:42 PM
I am looking for help on how to delete a menu item from my application. More specifically, how to persist my deletion of the menu item
The code sample below, does delete the menu item but when I restart the application, the menu item is back.
Any help on what to do after calling removeMenuItem is appreciated.
MyMenuItem _addLicenseItem = new MyMenuItem();
addMenuItem(_addLicenseItem);
...
//////////////////////////////////////////////////
// Inner classes
//////////////////////////////////////////////////
private class MyMenuItem extends MenuItem
{
private MyMenuItem()
{
super("My Menu" , 0x00010000, 13);
}
public void run()
{
removeMenuItem(this);
}
}
Solved! Go to Solution.
09-12-2009 10:23 PM
Issue resolved.
Please ignore.
09-13-2009 07:55 AM
Can you please mark this as Solved, so that we don't look?
Also, a hint as to how you resolved it could be useful to the next person.
09-13-2009 12:11 PM
Sure,
After the menu Item is removed I write a flag to the persistent store.
When the application is started again, if the flag is set, I don’t display the menu item.
09-13-2009 01:14 PM
Makes sense to me!
To mark this as solved, can you follow the instructions in the help, quick link here:
http://supportforums.blackberry.com/rim/help_faq#s