This is my third post regarding possible bugs in S40 SDK 2 when compared with previous S40 SDKs & devices - see Unable to read Chinese resource file S40 SDK 2 and Buttons in LCD forms start on a new line in S40 SDK 2 for the others.
This time menu options go missing in S40 SDK 2.
I have the followingThe Back command is displayed (using the curly arrow in bottom RHS). Under the menu button (the three stacked horizontal bars) the following are listed: New <Entity> and Edit. The Delete option is NOT displayed (UNEXPECTED).Code:protected List initStandardList() { if (standardList == null) { standardList = newStandardList(); standardList.setCommandListener(new CommandListener() { public void commandAction(javax.microedition.lcdui.Command command, Displayable displayable) { if (command == commands.getSelect()) controller.displayViewForm(standardList.getSelectedIndex()); else if (command == commands.getDelete()) controller.displayChoiceList(); else if (command == commands.getBack()) controller.back(); else if (command == commands.getEdit()) controller.displayEditForm(standardList.getSelectedIndex()); else if (command == newEntityCmd) controller.displayEditor(false); } }); standardList.addCommand(commands.getBack()); if ((getCommandFlags()[EDIT_IDX] == true) && (getDomainController().isNewEntityAllowed())) standardList.addCommand(getNewEntityCommand()); } if (controller.getSize() > 0) { standardList.setSelectCommand(commands.getSelect()); if (getCommandFlags()[EDIT_IDX] == true) { standardList.addCommand(commands.getEdit()); standardList.addCommand(commands.getDelete()); standardList.addCommand(new javax.microedition.lcdui.Command("Dummy 1", javax.microedition.lcdui.Command.ITEM, 0)); standardList.addCommand(new javax.microedition.lcdui.Command("Dummy 2", javax.microedition.lcdui.Command.ITEM, 0)); } } else { ...
I added Dummy 1 & 2 to see if this was some sort of UI problem - i.e. if they would push the Delete option into view. They don't and furthermore they are not listed either (UNEXPECTED).
On S40 E6 all commands are displayed as expected - i.e. Back on RH soft key, Select on middle soft key, Options on LH soft key with Dummy 1, Dummy 2, Delete, New <entity> and Edit commands all listed.
How can you work-around such unexpected differences (bugs?) between S40 editions?
Is there a different implementation of the normal command soft keys - some sort of pop-up list, say - that works between editions?
Thanks in advance for your help.

Reply With Quote


