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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
New Contributor
Posts: 8
Registered: ‎11-08-2011
My Device: 9800
My Carrier: Airtel

Help on Error 104

Hi All,

 

I am building an application which has list of selectable Items. when the item is selected, that perticular new screen is pushed.

 

following is the code

 

 protected boolean navigationClick(int status, int time)
       {
            int selected = _listField.getSelectedIndex();
            
            ItemInfoScreen screen     = (ItemInfoScreen) _listScreen.elementAt(selected);

 

           UiApplication.getUiApplication().pushScreen(screen);       
           return super.navigationClick(status, time);

}

 

I have created all the screens before and addElement into _listScreen Vector. I am trying to display the perticular screen when user clicks on the list item.

 

When the user clicks on the item i get

Error 104 Uncaught:RuntimeException Scroll for available commands

 

if i create the new ItemInfoScreen inside navigationClick() method it works fine. I am unable to understand what is going wrong here.

 

Please help me on this. This is my first blackbeery application and have gone through lots of tutorials to get so much working.

 

Thanks,

Abilash

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Help on Error 104

Hi and welcome to the forums.

 

I think it is almost impossible for someone to give you an explanation and resolve your problem with the information supplied.

 

The best thing to do is to replicate this problem on the Simulator.  Then the debugger will actually stop and the error point and you will be able to see it immediately.

 

If this is not possible, then the next best thing is to debug on device, in other words connect your device to the development environment and debug directly.  Search here and you find information on how to do on device debugging. 

 

If you can't  do this, then look in the debug log on the device and in there you should find a stack trace.  This will at least tell you whereabouts in the program the failure occurred.  To see the log on device, go to the Home screen, press and hold ALT, then press L, then G, then L, then G.  Do this immediately after you have a problem and then scroll the log to look for an entry from your application.

 

Good luck. 

Developer
Posts: 34
Registered: ‎07-25-2008
My Device: Not Specified

Re: Help on Error 104

[ Edited ]

try this.. when u are pushing the screen in navigationClick method...

 

UiApplication.getUiApplication().invokeLater(new Runnable() {

UiApplication.getUiApplication().pushScreen(screen); 

});

 

This may prevent the 104 error in ur code

Highlighted
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Help on Error 104

Interesting idea, but note that navigationClick is usually run with the EventLock, so this should not change the result you see.  But it won't hurt!

Developer
Posts: 34
Registered: ‎07-25-2008
My Device: Not Specified

Re: Help on Error 104

ya... i had seen pushing on main event thread created problems for me in the past... so doing it in new runnable worked.

it works fine for me.

it'll be good to know if it worked or didnt work .. or what worked for you abilashn03