Thread: Event Handling
View Single Post
  #5 (permalink)  
Old 05-07-2007, 06:36 PM
pegitha pegitha is offline
Member
 
Join Date: Apr 2007
Location: Indiana
Posts: 84
pegitha is on a distinguished road
Send a message via Skype™ to pegitha
Another issue with the code, each case is supposed to always have "break;" as the last liine.
case 1: canvas = new mostrarfotos(fotos[5]);
canvas.addCommand(exit);
canvas.addCommand(back);
canvas.setCommandListener(this) ;
pantalla.setCurrent(canvas);
break;
I have never used curley braces with the case either as you seem to have in your code. Mine look like this:
Code:
switch(i){ case o: doThis(); break; case 1: doThat(); break; }
curley braces only around the switch
Reply With Quote