View Single Post
Old 11-24-2008, 10:28 AM   #11 (permalink)
sickned
Knows Where the Search Button Is
 
Join Date: Oct 2008
Model: 7100T
PIN: N/A
Carrier: Unknow
Posts: 42
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by Ivanov View Post
in your extended UiApplication constructor:

- create a screen
- create a ws thread passing a reference of your screen to it.
- push your screen
- start your thread

your thread should call a function when it gets the result, this function updates the screen fields. Take care about event lock
Thanks you very much but this doesnt work.


Code:
public class PretiumMain extends UiApplication{
	

	
	public static void main(String[] args) {
		PretiumMain theApp = new PretiumMain();			
		theApp.enterEventDispatcher();	
		
	}

	public PretiumMain() {

			PretiumController controller = new PretiumController();

			InicioScreen inicio = new InicioScreen(controller);
			
			InicioThread t = new InicioThread(controller, inicio);

			UiApplication.getUiApplication().pushScreen(inicio);
			
			t.start();

	
	}

}
Offline   Reply With Quote