now the problem is in the code
i've got this 2 files just for example:
/* #### FILE 1 ##### */
- Code: Select all
public class Inicio extends MIDlet{
Menu menu = new Menu();
...
public void startApp (){
int actuale = menu.ACTUAL;
if(actuale == 0){
Display display = Display.getDisplay(this);
display.setCurrent(menu);
}else if(actuale == 1){
System.out.println("SUPOSTO CANVAS");
//Display display = Display.getDisplay(this);
//display.setCurrent(canvas);
}
}
...
}
/* #### FILE 2 ##### */
- Code: Select all
public class Menu extends Canvas implements Runnable{
...
Inicio iniciar = new Inicio();
...
protected void keyPressed(int keyCode) {
int gameAction = getGameAction( keyCode);
switch (gameAction) {
...
case FIRE:
if(MENU_SELECIONADO == 1) {
ACTUAL = 1;
iniciar.startApp();
}
...
}
}
ok that was the code
now the problem, it wont even start the app because i added the
"Inicio iniciar = new Inicio();"
but if i take ir out it works fine, but since i need the interaction between the two i really need that
can anyone exaplain to me why this doesn't work?
thanks:)
