Hi all !
I am trying to develop a blackberry application using my own EditField.
I have a class MyEditField that extends BasicEditField.
I have override all the draw and paint methods and use the update method to get the updated text from the textfield and draw accordingly somewhere else.
The problem i am facing is that some times when the SureType screen is active it throws an exception and exits
Uncaught Exception : Illegal Screen Index: 1
I have figured out that this has something to do with the suretype word completion screen. When i disable suretype to use MultiTap it works like charm.
does any one has any clue about this?
Below is my code.
I have tried this on 2 Semi-Qwerty phones 8100Pearl and 7310
Code:
public class MyEditField extends BasicEditField{
String text = "";
public MyEditField(){
super(NO_NEWLINE|NO_AUTOSPACE);
this.setMaxSize(1000);
}
protected void paint(Graphics arg0) {
return;
}
protected void paintBackground(Graphics g) {
return;
}
protected void drawFocus(Graphics g, boolean flag) {
return;
}
protected void highlightSelectedArea(Graphics g, boolean flag, int i, int j) {
return;
}
public void update(int arg0) {
String s = getText();
if(s != null)
MyTextField.setTextInternal(s);
super.update(arg0);
}
};