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
New Developer
Posts: 9
Registered: ‎01-06-2009
My Device: Not Specified

Display second menu

Hi,

 

When a user select an Item in the main menu, I'm trying to display a new reduced menu (by calling onMenu(in instance) in the execution code of the menuItem). This works fine on some BB and not on others. The makeMenu(menu, int instance) which is called by the underlining framework doesn't seems to give me back the correct "instance" value which was used for onMenu(instance). In the API documentation of makeMenu I can read "If your screen supports only one menu, instance may be ignored".

 

Question: 

1. How can I know how many number of menu is supported by the screen of a given device ?

2. Is a good design to invoke a second menu from the first menu ?

 

Best regards

Shan

New Developer
Posts: 14
Registered: ‎05-22-2008
My Device: Not Specified

Re: Display second menu

For all practical purposes, the difference is between trackwheel and trackball devices.  What I've done is show the full menu for trackwheel devices and then do a partial menu for trackball clicks.  This seems to mimic what RIM does for their applications and is fairly easy to code for so the same binary can work with both input types.

 

Touch screen is a different animal.  I have had no luck writing code that works well on the Storm as well as other devices.

New Developer
Posts: 9
Registered: ‎01-06-2009
My Device: Not Specified

Re: Display second menu

I'm facing this issue on trackBall device (Pearl and Curve). I also deal with trackWeel for old BB but I don't think this interact with my issue. I'm not able to reproduce the issue since for every BB I'm using this works fine but several customer reported that issue. I - think - the instance value given at call time of onMenu(instance) isn't given back properly when makeMenu(menu, instance) is called by the BB framework.

 

Shan