error illegal start of expression

Joined
Dec 26, 2008
Messages
1
Reaction score
0
get following error suposse double run method how to solve

C:\Archivos de programa\Research In Motion\BlackBerry JDE 4.7.0\bin\rapc.exe -quiet import=..\lib\net_rim_api.jar codename=..\samples\com\rim\samples\device\Soler\HTTPDemo ..\samples\com\rim\samples\device\Soler\HTTPDemo.rapc "C:\Archivos de programa\Research In Motion\BlackBerry JDE 4.7.0\samples\com\rim\samples\device\Soler\ColouredListField.java" "C:\Archivos de programa\Research In Motion\BlackBerry JDE 4.7.0\samples\com\rim\samples\device\Soler\ColourListFieldSample.java" "C:\Archivos de programa\Research In Motion\BlackBerry JDE 4.7.0\samples\com\rim\samples\device\Soler\ElRecreo.java" "C:\Archivos de programa\Research In Motion\BlackBerry JDE 4.7.0\samples\com\rim\samples\device\Soler\img\httpdemo_jde.png" "C:\Archivos de programa\Research In Motion\BlackBerry JDE 4.7.0\samples\com\rim\samples\device\Soler\PasswordPopupScreen.java" "C:\Archivos de programa\Research In Motion\BlackBerry JDE 4.7.0\samples\com\rim\samples\device\Soler\WapOptionsScreen.java"
C:\Archivos de programa\Research In Motion\BlackBerry JDE 4.7.0\samples\com\rim\samples\device\Soler\ColourListFieldSample.java:32: illegal start of expression
public void run()
^
C:\Archivos de programa\Research In Motion\BlackBerry JDE 4.7.0\samples\com\rim\samples\device\Soler\ColourListFieldSample.java:32: illegal start of expression
public void run()
^
C:\Archivos de programa\Research In Motion\BlackBerry JDE 4.7.0\samples\com\rim\samples\device\Soler\ColourListFieldSample.java:32: ';' expected
public void run()
^
3 errors

main page declaration and methods









private ColourListFieldSample _ListaColoresScreen;

menu.add(_ListaColoresScreen);

private MenuItem _ListaColoresScreen = new MenuItem("Lista Colores", 120, 10)
{
public void run()
{
_ListaColoresScreen.display();
}
};









the class

final class ColourListFieldSample extends MainScreen implements ListFieldCallback
{
private UiApplication _app;
private MainScreen _this;

private static final String[] _elements = {"First element", "Second element", "Third element", "Fourth element", "Fifth element"};
private Vector _listElements = new Vector(_elements.length, 1);


ColourListFieldSample(UiApplication app)
{
super();
_this = this;
_app = app;
{
public void run()
{
ColourListFieldSample _app = new ColourListFieldSample();
_app.enterEventDispatcher();

}
};
// MainScreen myScreen = new MainScreen();
// myScreen.setTitle(new LabelField("Colour ListField sample");

ColouredListField colourList = new ColouredListField();

//Set the ListFieldCallback
colourList.setCallback(_this);

int elementLength = _elements.length;

//Populate the ListField & ListFieldCallback with data.
for(int count = 0; count < elementLength; ++count)
{
colourList.insert(count);
_this.insert(_elements[count], count);
}

//Add the ListField to the screen.
_this.add(colourList);



}
public void display()
{
_app.pushScreen(_this);
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,222
Members
46,809
Latest member
moe77

Latest Threads

Top