Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
nik_bhat
Posts: 29
Registered: ‎09-23-2008
My Device: 8800
Accepted Solution

Custom Application Menu Items

Good Morning,

 

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!

 

Cheers,

Nik.

Please use plain text.
Developer
peter_strange
Posts: 19,603
Registered: ‎07-14-2008
My Device: Not Specified

Re: Custom Application Menu Items

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.

Please use plain text.
Developer
nik_bhat
Posts: 29
Registered: ‎09-23-2008
My Device: 8800

Re: Custom Application Menu Items

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,

 

Cheers,

Nik.

Please use plain text.