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

Web and WebWorks Development

Reply
Developer
aserra
Posts: 63
Registered: ‎10-07-2009
My Device: Not Specified
Accepted Solution

Menu item in torch 6.0

We tried to add personal menu item in 6.0 (torch), and BB does not show any item:

 

 

if (blackberry.ui.menu.getMenuItems().length > 0)
        blackberry.ui.menu.clearMenuItems();
    
    var item = null;

    item = new blackberry.ui.menu.MenuItem(false, 3, "Start", login_index);
    blackberry.ui.menu.addMenuItem(item);

    item = new blackberry.ui.menu.MenuItem(false, 3, "Config aplicacion", app_configapp);
    blackberry.ui.menu.addMenuItem(item);

    item = new blackberry.ui.menu.MenuItem(false, 3, "Reset App", reset_app);
    blackberry.ui.menu.addMenuItem(item);

 

 

BB show the basic menu Switch | Select | Close

any idea?

 

Thanks

Please use plain text.
Developer
araskin
Posts: 128
Registered: ‎08-01-2008
My Device: Bold 9900, 9810, 9780, 9650 and so many others
My Carrier: T-Mobile

Re: Menu item in torch 6.0

Hi,

 

This is really cool. I checked the blackberry object documentation but I dont see the UI property. What makes you think this feature is available?

 

http://docs.blackberry.com/en/developers/deliverables/18446/blackberry_568402_11.jsp

 

Alon

Please use plain text.
Contributor
dbotelho
Posts: 21
Registered: ‎12-03-2010
My Device: Blackberry Bold 9700

Re: Menu item in torch 6.0

Do you have both blackberry.ui.menu and blackberry.ui.dialog in your config.xml file?

Please use plain text.
Developer
aserra
Posts: 63
Registered: ‎10-07-2009
My Device: Not Specified

Re: Menu item in torch 6.0

yes, all features loaded

Please use plain text.
Contributor
dbotelho
Posts: 21
Registered: ‎12-03-2010
My Device: Blackberry Bold 9700

Re: Menu item in torch 6.0

Actually this is an OS 6 bug related to conflict namespaces between those two features:

- http://supportforums.blackberry.com/t5/Web-Development/MenuItem-sample-app-problem/m-p/617847/highli...

I've made workaround for this, by creating an Javascript extension that acts like blackberry.ui.dialog and completely remove it from the "config.xml" file.

I've a post explaining how to do this with the javascript extension here:
- http://blog.dbotelho.com/2010/12/blackberry-widget-dialog-and-menu-conflict-issue-for-os-6-x/

 

Hope it helps

Please use plain text.
Administrator
astanley
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: Menu item in torch 6.0

aserra - yes, as explained there is currently a bug with WebWorks apps running on BlackBerry 6 OS where you cannot use both blackberry.ui.menu and blackberry.ui.dialog in the same app.  This will be fixed as part of the BlackBerry WebWorks Open Source project.

 

 

araskin -  For your interest, these objects exist within the context of the WebWorks application platform, not the browser (which is the link you provided).  Here are some links that you may find interesting:

 

dbotelho - great post!  Do you blog about your WebWorks development often?  Have you published an application?

 

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
Please use plain text.
Contributor
dbotelho
Posts: 21
Registered: ‎12-03-2010
My Device: Blackberry Bold 9700

Re: Menu item in torch 6.0

dbotelho - great post!  Do you blog about your WebWorks development often?  Have you published an application?

Thanks astanley! Actually this is my first month of BB Development and that was my first post relating to it! I hope to deploy an BB widget application at the end of this month, and if everything works fine I'm sure I'll be posting and contributing more often :smileyhappy:

 

Best regards,

Daniel Botelho

Please use plain text.