BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 09-01-2008, 02:39 AM   #1 (permalink)
New Member
 
Join Date: Jul 2008
Model: 8130
PIN: N/A
Carrier: Airtel
Posts: 1
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Uncaught Exception : Illegal Screen Index: 1

Please Login to Remove!

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);
    	}
    	
  	   	
    };
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

1Pcs Qfp144 Ad9388abstz-170 Ad9388a Qfp-144 Ic New W
$16.4
1Pcs Qfp144 Ad9388abstz-170 Ad9388a Qfp-144 Ic New W picture5Pcs Hd74ls32p 74Ls32 Dip Or Gate Hitachi Quad 2-Input Ic New W
$1.78
5Pcs Hd74ls32p 74Ls32 Dip Or Gate Hitachi Quad 2-Input Ic New W picture10Pcs Source Driver Udn2981a Udn2981 8Chan 18-Dip Ic New Z
$5.56
10Pcs Source Driver Udn2981a Udn2981 8Chan 18-Dip Ic New Z pictureMatched quad of 2SK389BL 2SJ109BL 100% original and genuine Toshiba 006
$69.0
Matched quad of  2SK389BL 2SJ109BL 100% original and genuine Toshiba 006 picture1Pcs Tms320lf2407apges 320Lf2407apges Qfp144 Ic N
$37.75
1Pcs Tms320lf2407apges 320Lf2407apges Qfp144 Ic N picture






Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.