BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 12-04-2008, 01:56 PM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: May 2008
Model: 8330
PIN: N/A
Carrier: Telus
Posts: 26
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default TouchEvents on 9530

Please Login to Remove!

I'm having some trouble with the MOVE TouchEvent on the 9530 (Storm). The events are all detected properly, but there is a huge lag on the device from when I actually move my finger around to when it responds to it.

I assume the touchEvent() method in Screen being called very frequently is what is causing the lag. Is there any way to make the touchEvent method get called less frequently? Or is this not even the problem?

Here is how my application is running. Could the way that it loops possibly be the cause?

Code:
public class Application extends UiApplication {
	public MyClass myClass;

	public static void main(String[] argv) {
		Application app = new Application();
		app.enterEventDispatcher();
	}

	public Application() {
		this.enableKeyUpEvents(true);

		myClass= new MyClass();
		pushScreen(myClass);
		myClass.initAppData();
		Ui.getUiEngineInstance().setAcceptableDirections(Display.DIRECTION_NORTH);
		new Thread(myClass).start();
	}
}
Code:
public class MyClass extends MainScreen implements Runnable
{
	public void run() {
		try {
			while (running) {
				mainLoop(); // This is my code is
			}
		} catch (Exception e) {
		}
		System.exit(0);
	}
}
Offline  
Old 12-04-2008, 02:14 PM   #2 (permalink)
Knows Where the Search Button Is
 
Join Date: May 2008
Model: 8330
PIN: N/A
Carrier: Telus
Posts: 26
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

As is usually the case, I figured out the problem just after posting this. I needed a Thread.sleep() in my main loop.
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

JOHNSON CONTROLS T-5210-1114 TRANSMITTER *NEW NO BOX*
$20.0
JOHNSON CONTROLS T-5210-1114 TRANSMITTER *NEW NO BOX* pictureJOHNSON CONTROLS P-5217 STATIC PRESSURE TRANSMITTER *NEW NO BOX*
$125.0
JOHNSON CONTROLS P-5217 STATIC PRESSURE TRANSMITTER *NEW NO BOX* pictureJOHNSON CONTROLS T26 SER LINE VOLTAGE THERMOSTAT T26T-3E NEW IN BOX
$49.99
JOHNSON CONTROLS T26 SER LINE VOLTAGE THERMOSTAT T26T-3E NEW IN BOX picture(2) Johnson Controls P32AF-2 Differential Pressure Switch 0.05-5 IN. W.C.
$70.0
(2) Johnson Controls P32AF-2 Differential Pressure Switch 0.05-5 IN. W.C. pictureJohnson Controls P100AP-3C Encapsulated Pressure control
$20.0
Johnson Controls P100AP-3C Encapsulated Pressure control picture






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