Hey, just written some code to display a fairly simple alert. It works fine in the emulator - just how it should. Trouble is, when i bluetooth it over to my T610, it doesn't work right! >>>>>>> canvas = new BOCanvas(this, levelNum); canvas.setCommandListener(this); canvas.addCommand(forfeitKey); displayMan.setCurrent( canvas );
nextLevel = new Alert(alertTitle, "Level " + levelNum, null, AlertType.INFO); nextLevel.setTimeout(2000); displayMan.setCurrent(nextLevel); >>>>>>> Basically the code is called when a "play game" call is made. It's purpose is to pop an alert saying the level number, then go into the game. In the emulator this works perfectly. However on my phone, when 'play game' is selected, the alert is called, but it seems that the : displayMan.setCurrent( canvas ); piece of code isnt because after the alert, the menu with 'play game' upon it, re-appears. If I duplicate the setCurrent( canvas); piece of code and put it after setCurrent(nextLevel); then the canvas is displayed, but the alert isnt displayed (or probably it is displayed just for a split second) If anyone could help me out I'd be very gratfeul! Matt
it is strange. Such code should not show something after alert. And it should not work on emulator also. Last screen you set is alert and it should stay. The solution is to use setCurrent(Alert alert, Displayable nextDisplayable method of Display class. Or simple duplicate your code (as you described).
I am not really coming from the outer space. I am mentally diverged. <br />Are you mentally diverged too, my friend?<br />(c)"12 Monkeys"