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
Highlighted
New Contributor
Posts: 6
Registered: ‎10-09-2013
My Device: Z10
My Carrier: Verison
Accepted Solution

bbui.js action bar button press problem evaluating Context menu "undefined is not an object"

I was updating my bbui.js file to newest version and my splash screen action bar buttons are now broken when I deploy to my Dev Alpha B with the 10.2 OS update. However when I emulate the app in Ripple there are no error messages and everything works. 

 

When I open up web-insector to see what happens the console reads after I press any of the buttons:

 

"TypeError: 'undefined' is not an object (evaluating 'blackberry.ui.contextmenu.CONTEXT_ALL')

 

I have button in the context menu that worked just fine before on each of the pages.

 

All my code is availalbe for inspection at https://github.com/InnovateorDieOnline/BOTE

 

Thank you in advance.

Retired
Posts: 1,561
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: bbui.js action bar button press problem evaluating Context menu "undefined is not an object"

Hi there, did you update the WebWorks extension as well (outlined in the Prerequisites section here.)
https://github.com/blackberry/bbUI.js/wiki/Context-Menus

The latest version of bbUI.js handles the Context Menu differently and you need to make a few changes in addition to updating the script files.

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.
New Contributor
Posts: 6
Registered: ‎10-09-2013
My Device: Z10
My Carrier: Verison

Re: bbui.js action bar button press problem evaluating Context menu "undefined is not an object"

Erik,

 

Thank you again. I stumbled across this update as well and including the context.ui in my config file.

 

Ultimate for my app I chose to switch the buttons to an action bar overflow layout because of the restrictions with only being able to attach a context menu to a click and hold of either grid or picture layout item and not an action-bar button.