I'm learning to develop some basic applications for Nokia S40 devices. I've created a couple of Commands for the user to use. The problem is that command 'no' works however 'yes' does nothing. Why is this? The example is as follows:
final Form form = new Form("Form");
form.append("Update?");
final Command yes = new Command("Yes", Command.OK, 1);
final Command no = new Command("No", Command.CANCEL, 1);
form.addCommand(yes);
form.addCommand(no);
form.setCommandListener(new CommandListener() {
public void commandAction(Command arg0, Displayable arg1) {
// TODO Auto-generated method stub
if (arg0 == yes) {
System.out.println("Yes pressed");
} else if (arg0 == no) {
System.out.println("No Pressed");
}
}
});
Any pointers or advice would be appreciated.