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
New Contributor
akarthik10
Posts: 3
Registered: ‎10-01-2013
My Carrier: Airtel
Accepted Solution

blackberry.ui.menu is undefined

Hello,

I'm developing an application using the Webworks SDK for BB10 (not playbook).

I'm trying to create an application menu using the blackberry.ui.menu but webinspector reports it as undefined.

I'm working on Windows platform with WebWorks SDK version 1.0.4.11

 

I tried console.log(blackberry.ui) and I got :

Object{toast: Object}


(As I had included blackberry.ui.toast in my config.xml) toast and dialog are working fine for me, but not menu.

 

I found that I do not have 'menu' folder in Webworks SDK path\Framework\ext\

I only have folders ui.contextmenu, ui.cover, ui.dialog and ui.toast . Is that an issue?

 

By the way I have configured the config.xml for Debugging and here is my config.xml

    <feature id="blackberry.app" />
    <feature id="blackberry.ui" />
    <feature id="blackberry.ui.menu" />
    <feature id="blackberry.ui.toast" />
    <feature id="blackberry.identity" />
    <feature id="blackberry.system" />
    <access uri="https://getpocket.com" subdomains="true" />

 I make ajax posts to the getpocket domain specified, but all the work is done by the local files. I also tried adding access uri to * and disabling websecurity, but it doesn't seem to work.

I would be glad if anyone could guide me where I could be going wrong.

Please use plain text.
BlackBerry Development Advisor
bryanhiggins
Posts: 180
Registered: ‎12-18-2012
My Carrier: Bell

Re: blackberry.ui.menu is undefined

Hi,

 

blackberry.ui.menu is only available on BBOS

 

Thanks,

Bryan Higgins
BlackBerry WebWorks
@bryanhiggins
Please use plain text.
New Contributor
akarthik10
Posts: 3
Registered: ‎10-01-2013
My Carrier: Airtel

Re: blackberry.ui.menu is undefined

Thanks for your response @bryanhiggins, but this is present in the kitchensink example. It is not working for me even if i try to run the kitchensink example.
Please use plain text.
BlackBerry Development Advisor
bryanhiggins
Posts: 180
Registered: ‎12-18-2012
My Carrier: Bell

Re: blackberry.ui.menu is undefined

It's definitely not in the SDK and is documented as BBOS only on the API site.

 

For BB10, we have blackberry.ui.contextmenu

 

https://developer.blackberry.com/html5/apis/blackberry.ui.contextmenu.html

Bryan Higgins
BlackBerry WebWorks
@bryanhiggins
Please use plain text.
BlackBerry Development Advisor
oros
Posts: 1,459
Registered: ‎04-12-2010
My Carrier: Bell

Re: blackberry.ui.menu is undefined

Can you please point to the KitchenSink sample you are using akarthik10? I'm curious to see how it was being used there / fix it to avoid any issues in the future.

Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
Please use plain text.
New Contributor
akarthik10
Posts: 3
Registered: ‎10-01-2013
My Carrier: Airtel

Re: blackberry.ui.menu is undefined

Here is the kitchenSink example: https://github.com/blackberry/WebWorks-Community-Samples/tree/master/kitchenSink/

 

When the application is run, under the User Experience section, Click on Menu API.

I get : blackberry.ui.menu object not found

Please use plain text.
BlackBerry Development Advisor
twindsor
Posts: 739
Registered: ‎07-15-2008
My Carrier: Bell

Re: blackberry.ui.menu is undefined

That repository is for WebWorks on BBOS and PlayBook. The samples for BB10 are in the BB10-WebWorks-Community-Samples repository here: https://github.com/blackberry/BB10-WebWorks-Community-Samples

Tim Windsor
Application Development Consultant
Please use plain text.
Developer
peardox
Posts: 1,227
Registered: ‎03-20-2011
My Carrier: 3, Orange, Vodafone

Re: blackberry.ui.menu is undefined

Actually Tim (both of you) there are two additional errors with a BBui compile

 

blackberry.system.event is flagged as is ... errm - it's in a GitHub issue somewhere

 

I don't wanna spend time researching trivial stuff but it is a concern that bbwp throws errors like this on the demo bbui




Click the like button if you find my posts useful!
Please use plain text.
BlackBerry Development Advisor
twindsor
Posts: 739
Registered: ‎07-15-2008
My Carrier: Bell

Re: blackberry.ui.menu is undefined

That's a good point. The samples for bbUI.js have been split into separate ones for each platform, so I don't know why there are still references to extensions that don't exist. It should through only a warning though, not a full error.

Tim Windsor
Application Development Consultant
Please use plain text.
Developer
peardox
Posts: 1,227
Registered: ‎03-20-2011
My Carrier: 3, Orange, Vodafone

Re: blackberry.ui.menu is undefined

Without looking (I've spent hours fixing BBui earlier this week for Z30 - no thanks) my simple choice is to ignore the errors

 

If it works...

 

 




Click the like button if you find my posts useful!
Please use plain text.