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
Contributor
Praeses
Posts: 23
Registered: ‎06-07-2012
My Device: 9810

Simulator javascript error

I package the JS+HTML5+CSS3 project and upload in simulator 9810.

 

After debug I found the error in JS. That part of code is catch the error:

--------

try {
var item = new blackberry.ui.menu.MenuItem(false, index + 1, menuItem.name, menuItem.func);
} catch(error) {
document.getElementById('console').innerHTML = 'error';
}

--------

 

What I need to fix it?

Thanks!

 

 

Contributor
Praeses
Posts: 23
Registered: ‎06-07-2012
My Device: 9810

Re: Simulator javascript error

Although someone can help me?

Developer
nunodonato
Posts: 313
Registered: ‎03-28-2012
My Device: Curve 9360, Playbook, BB10 Dev Alpha

Re: Simulator javascript error

so.. what's the error being shown?
do you get this in ripple too or only in the simulator?
Nuno
theBBthing.wordpress.com - my BlackBerry development blog: news, tips and tutorials
bitoutsidethebox.com - re-imagining digital solutions


Contributor
Praeses
Posts: 23
Registered: ‎06-07-2012
My Device: 9810

Re: Simulator javascript error

I think it's a fatal in method. This eror only in simulator, in ripple - ok.

For now I have not set up debugging in simulator, so i don't know what the error is.

Developer
nunodonato
Posts: 313
Registered: ‎03-28-2012
My Device: Curve 9360, Playbook, BB10 Dev Alpha

Re: Simulator javascript error

what does the error show in the simulator?
Nuno
theBBthing.wordpress.com - my BlackBerry development blog: news, tips and tutorials
bitoutsidethebox.com - re-imagining digital solutions


Retired
astanley
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: Simulator javascript error

 

Can you change your code to display the actual error message?

 

try {
var item = new blackberry.ui.menu.MenuItem(false, index + 1, menuItem.name, menuItem.func);
} catch(error) {
// document.getElementById('console').innerHTML = 'error';
document.getElementById('console').innerHTML = e;
}

 This should provide more details about what the problem is. 

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.