Hello guys,
thanks for the answers. This is part of my source code (syntax is wrong, i have deleted a few rows for easier reading).
Code:
private Form mainForm;
private Form formAnzahl;
private TextField textFieldAnzahl;
private List auswahlListe;
public void commandAction(Command command, Displayable displayable) {
if (displayable == auswahlListe) {
if (command == List.SELECT_COMMAND) {
auswahlListeAction();
} else if (command == listeBackCommand) {
switchDisplayable(null, getMainForm());
}
} else if (displayable == formAnzahl) {
if (command == anzahlOkCommand) {
... //some conversion and calculation with textFieldAnzahl.getString();
switchDisplayable(null, getMainForm());//back to main screen
public void auswahlListeAction() {
String __selectedString = getAuswahlListe().getString(getAuswahlListe().getSelectedIndex());
listIndex = getAuswahlListe().getSelectedIndex();
//look up some item with index
//go to form with textfield "textFieldAnzahl"
switchDisplayable(null, getFormAnzahl());
public Form getFormAnzahl() {
if (formAnzahl == null) {
formAnzahl = new Form("Menge eingeben", new Item[] { getStringItemAuswahl(), getTextFieldAnzahl() });
formAnzahl.addCommand(getAnzahlOkCommand());
formAnzahl.addCommand(getBackCommand());
formAnzahl.setCommandListener(this);
return formAnzahl;
}
public TextField getTextFieldAnzahl() {
if (textFieldAnzahl == null) {
textFieldAnzahl = new TextField("Anzahl:", "1", 32, TextField.NUMERIC);//GEN-LINE:|40-getter|1|40-postInit
}
return textFieldAnzahl;
}
@R a j : I feel the code reflects what you say.
I don't know what went wrong the your Textbox. I guess it is something different you changed. Maybe you activated CLDC 1.1 ?
I think CLDC 1.1 may be activated. I'll check. But why would that cause the error message?
Regards,
Tobias.