10-16-2008 06:43 PM
From a configuration file, I am giving the user the option to add and delete Menu Items that would appear on a native BlackBerry Java Application, i.e. Calendar, Contacts etc. It is all hunky dory, adding menu items to the repository and the native application, but, without a reference to the original object (which I believe is garbage collected and stored somewhere in the recesses of the BB database), I cannot delete the Custom Menu Item, added earlier. (tried static memeber variable, and overwriting the previous menu item text, just comes up as a duplicate value in the menu)
I have read forums and the manuals and the API's extensively, but I've yet to come across a solution.
I've read up of people coming across this issue, if there is a plausible solution, could you give a shout!
Solved! Go to Solution.
10-16-2008 07:17 PM
If you want to remove an ApplicationMenuItem, you have to retain a reference to the actual menu item you added and use that reference to delete it. I find the best place to do this is RuntimeStore.
BTW not sure if you are making this available to old BlackBerry OS, but even if you do this, the delete does not work in OS 4.0, but does in the latest OS. Sorry not tested pre OS 4.0.
10-16-2008 07:50 PM
I guessed as much, it had to be the RuntimeStore. Guess there is no other way!
I will need to ask about the device reset, putting it in the new thread.
Thanks again Peter,