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

Reply
Highlighted
Contributor
Posts: 13
Registered: ‎08-10-2011
My Device: Bold 9780
My Carrier: movistar
Accepted Solution

SimpleLIst Error on Bold 9780

[ Edited ]

Why this example has this error "Scroll for available commands" on Bold 9780 or 9650?

 

import net.rim.device.api.ui.*;
import net.rim.device.api.ui.container.*;
import net.rim.device.api.ui.component.*;
import net.rim.device.api.ui.component.table.*;
public class SimpleListDemo extends UiApplication
{
public static void main(String[] args)
{
SimpleListDemo theApp = new SimpleListDemo();
theApp.enterEventDispatcher();
}
public SimpleListDemo()
{
pushScreen(new SimpleListScreen());
}
private static final class SimpleListScreen extends MainScreen
{
public SimpleListScreen()
{
super(Manager.NO_VERTICAL_SCROLL);
setTitle("Simple List Demo");
add(new LabelField("My list", LabelField.FIELD_HCENTER));
add(new SeparatorField());
Manager mainManager = getMainManager();
SimpleList listField = new SimpleList(mainManager);
listField.add("Item 1");
listField.add("Item 2");
listField.add("Item 3");
listField.add("Item 3");
listField.add("Item 3");
listField.add("Item 3");
listField.add("Item 3");
listField.add("Item 3");
listField.add("Item 3");
listField.add("Item 31");
listField.add("Item 31");
listField.add("Item 31");

}
}
}

 

Thanks

BlackBerry Development Advisor
Posts: 15,753
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: SimpleLIst Error on Bold 9780

I don't see an issue with the code you posted.

 

It sounds like you are seeing the screen that is shown if an uncaught exception is thrown.  What exception is being thrown?  What link of code is throwing it?

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Contributor
Posts: 13
Registered: ‎08-10-2011
My Device: Bold 9780
My Carrier: movistar

Re: SimpleLIst Error on Bold 9780

Thanks¡¡ I have the solution¡¡¡

 

        
        DemoVerticalFieldManager vfm = new DemoVerticalFieldManager(Manager.NO_VERTICAL_SCROLL);               

        // Create a SimpleList to display the available image names        
        _picturesList = new SimpleList(vfm);