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
Contributor
Posts: 44
Registered: ‎10-28-2010
My Device: Not Specified
Accepted Solution

OS 6.0.0 on 9700 screen.getMenu(0) does not work

Hi, this code works for OS 5.0.0 on 9700 - why it does not work on 6?

Thanks

 

 

 

 Screen screen = Ui.getUiEngine().getActiveScreen();
      
Menu menu = screen.getMenu(0);
int cnt = menu == null ? 0 : menu.getSize();
        
        for (int i = 0;  i < cnt; i++)
        {
            String menuItem = menu.getItem(i).toString();
            if (menuItem.startsWith(menuItemText))
            {
                    menu.getItem(i).run();
                    return true;
            }
        }
        return false;

Developer
Posts: 1,055
Registered: ‎01-25-2009
My Device: BlackBerry Bold 9650/BlackBerry Torch 9800

Re: OS 6.0.0 on 9700 screen.getMenu(0) does not work

[ Edited ]

There is a bug in OS 6.0 on the 9700 up to 6.0.0.358. The issue *SHOULD* be resolved in versions after 6.0.0.359 but I cannot guarantee it.

 

This is what I was told.

Jerome Carty - Follow jcarty on Twitter@jcarty | #webworks-dev / #BlackberryDev on irc.freenode.net | My Apps
Click "Accept as Solution" if post solved your original issue.. Give like/thumbs up if you feel post is helpful
Contributor
Posts: 44
Registered: ‎10-28-2010
My Device: Not Specified

Re: OS 6.0.0 on 9700 screen.getMenu(0) does not work

Thanks,

 

I have installed the 9700M_PBr6.0.0_rel1308_PL6.6.0.63_A6.0.0.358,

 

In addition on the OS6 simulator it works but not on the device....