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
kungfucop
Posts: 57
Registered: ‎05-25-2009
My Device: Not Specified

Possible bug of Context Menu on bold -version v4.6.0.167.

Hi, i want to press the menu button to the left of the scrollbal to show the universal menu, and click the scrollball on the listfield to show the list item related local menu. For instance, the screen has a listfield with 10 rows of staff information, and I press the scrollball on a selected person to show a menu list like :  view name

                                       view address

                                       view job area

 

when I  click the  menu button to the left of the scrollball, another menu list which is glaobal content related  is show :

 

 

                                                                                                              Exit the App

                                                                                                              Switch Language

 

 

The code I am using is 

 

 

protected void makeMenu(Menu menu, int instance) {
super.makeMenu(menu, instance);
if (instance == Menu.INSTANCE_DEFAULT) {//menu button clicked
menu. add(Exit)
menu. add(ChangeLanguage)
menu.add(MenuItem.separator(98));
} else if (instance == Menu.INSTANCE_CONTEXT) {
//listfield items clicked with scrollbal
menu.add(_gotoName);
menu.add(_gotoAddress);
menu.add(_gotoJobArea);
}

}

 

 This code works well on curve 8900, and 8820,8830, and most of the bold v 4.6.0.92 machine, however, it doesn't work on the another bold with version v4.6.0.167( when I click the scrollball, the universal menu is shown not the context menu). So I wonde wether it is a bug? or there is something else might cause it? Thanks.

 

 

 

 

 

Developer
bikas
Posts: 984
Registered: ‎02-10-2009
My Device: Not Specified

Re: Possible bug of Context Menu on bold -version v4.6.0.167.

Developer
kungfucop
Posts: 57
Registered: ‎05-25-2009
My Device: Not Specified

Re: Possible bug of Context Menu on bold -version v4.6.0.167.

Hi, Bikas, Thank you very much for your reply, but I have read the articles, and I still can not figure out how to solve the problem, would you please give me some further tip?
Developer
kungfucop
Posts: 57
Registered: ‎05-25-2009
My Device: Not Specified

Re: Possible bug of Context Menu on bold -version v4.6.0.167.

Can anybody gives some advice ? where is the flaw in this piece of code?
Developer
kungfucop
Posts: 57
Registered: ‎05-25-2009
My Device: Not Specified

Re: Possible bug of Context Menu on bold -version v4.6.0.167.

still not solved. Can anybody help?
Developer
kungfucop
Posts: 57
Registered: ‎05-25-2009
My Device: Not Specified

Re: Possible bug of Context Menu on bold -version v4.6.0.167.

waiting for the reply from Blackberry development group. Thanks.
Developer
jaschroe
Posts: 32
Registered: ‎08-26-2008
My Device: Not Specified

Re: Possible bug of Context Menu on bold -version v4.6.0.167.

Hi kungfucop,

 

Have you seen the "Menu Style" option at the bottom of the Screen/Keyboard options in the Options app? If you set it to "Full", then the trackball click and the menu-key click behave the same.

 

Best regards,

jaschroe

Developer
kungfucop
Posts: 57
Registered: ‎05-25-2009
My Device: Not Specified

Re: Possible bug of Context Menu on bold -version v4.6.0.167.

[ Edited ]
thanks jasc, I will tell my client to try.
Message Edited by kungfucop on 08-26-2009 12:39 AM