WTK 2.5 hangs
Hi,
In my work place we work with WTK22, but it doesn't have emulation classes for jsr 179 and 82, which is a must for me, so i tried WTK25.
it has a problem though.
every time i run the emulator and creates external event (sms\Location request the emulator displays an Alert screen that asks if to allow the communication, but there is hangs.
I run it with EclipseMe and paused the threads only to find out they are all in wait state :-/
Bug ? misconfiguration on my behalf ?
[514 byte] By [
poohTbeara] at [2007-11-26 23:42:08]

# 2
I have faced a same problem earlier. My program structure was as follows:
1. When a user selects a command key after editing a message the commandAction function is fired.
2. I was sending the sms from that function. And it was hanging after the alert.
The error was that, sending and message outside (using GCF) is not allowed from the commandAction event. (I don't know why). So I created a new thread in that commandAction event and then from the run method of that thread I sent that sms, and it is working fine. The structure of the program must be:
public class MyMidletClass extends Midlet implements CommandListener,Runnable {
//.... all your stuffs here
public void commandAction(Command c, Displayable s){
//Check if it is required to send SMS then do the following below
new Thread(this).start();
}
public void run() {
//Here will be the code for sending SMS..
}
}
Hope it helps :)