CommandListener on TextField.NUMERIC || TextField.PASSWORD

Has anyone ever come across this problem.TextField.NUMERIC || TextField.PASSWORD never calls its commandlistener (Itemstatelistener).I am using J2ME Polish tool. Is is J2ME Polish problem or J2ME general problem?Kind Regards,Edit/Delete Message
[279 byte] By [lekkie.aydota] at [2007-11-27 10:03:23]
# 1
never use J2MEPolish but i think that it comes from your code...
suparenoa at 2007-7-13 0:38:21 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 2
But whenever I dont set the TextField to Numeric | Password, itemStateListener is always called. How about that?I am hopin it a J2Me bug.Regards.
lekkie.aydota at 2007-7-13 0:38:21 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 3
can you show us the problematic code (use Formatting tips to send the code)
suparenoa at 2007-7-13 0:38:21 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 4

Funny enough, there is no syntactic error.

public TextField txtPIN = new TextField ("PIN", null, 4, TextField.PASSWORD | TextField.NUMERIC | TextField.SENSITIVE);

public MobilityForm(String title, Display display, Displayable next, String cmdName, MIDlet m) {

setCommandListener(this);

this.setItemStateListener(this);

}

public void itemStateChanged(Item item) {

// never gets here

if (item instanceof TextField) {

TextField field = (TextField) item;

if(field.getLabel().equals("PIN")){

cust.GetCard().setPin(this.txtPIN.getString());

}

}

}

lekkie.aydota at 2007-7-13 0:38:21 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 5

have you try to implement ItemStateListener?

(in your next posts, use th f***** formatting tips (http://forum.java.sun.com/help.jspa?sec=formatting) )

for example,

it is better to read code formatted like that

...

// oh yes it is easier to read me !!!

public void easierToReadMe(String threadString){

easyToDisplay(threadString);

// ...

}

...

than this code:

...

// oh yes it is easier to read me !!!

public void easierToReadMe(String threadString){

easyToDisplay(threadString);

// ...

}

...

suparenoa at 2007-7-13 0:38:21 > top of Java-index,Java Mobility Forums,Java ME Technologies...