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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Developer
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.

Developer
Posts: 19,636
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.

Highlighted
Developer
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.