i have scheduled to fire an event on fire key , but the same event is also firing on left and right key also , the code is written in fire key only. how can i correct it .
thanks and regards
Arunesh
i have scheduled to fire an event on fire key , but the same event is also firing on left and right key also , the code is written in fire key only. how can i correct it .
thanks and regards
Arunesh
Check the keycodes in the keypress and filter out the left & right softkey events.
thanks,
~Amitabh
it will be very kind of you if you can tell me how to filter those keys , i have to perform this action in the "FIRE" key only .
thanks and regards
Arunesh
Paste the code block where you are "checking the Fire key" and fireing the event, we will correct it.i have scheduled to fire an event on fire key , but the same event is also firing on left and right key also , the code is written in fire key only. how can i correct it .
thanks,
~Amitabh
the code is some thing like this
case eMagineMidlet.Key_FIRE:
if (isMainMenu) {
System.out.println("program reached here ");
Alert alt = new Alert("Info");
alt.setString("City already exits");
alt.setTimeout(3000);
midlet.dis.setCurrent(alt);
}
futher i have nothing to do at left and right press when the value of boolean "isMainMenu" is true.
when i am using fire key , the event is firing , but the same event is firing at left and right key fire
kindly help me .
thanks and regards
Arunesh
You are missing the break; in your switch case after this FIRE event handling.
case eMagineMidlet.Key_FIRE:
if (isMainMenu) {
System.out.println("program reached here ");
Alert alt = new Alert("Info");
alt.setString("City already exits");
alt.setTimeout(3000);
midlet.dis.setCurrent(alt);
}
break;
thanks,
~Amitabh
i m checking lot of conditions in this , and applying break at the last .... is this the reason
Arunesh
may be.
thanks,
~Amitabh