Hey all, here's what I'm doing
I have my UI, which starts 2 threads.
The first thread simply constantly incrememnts a number within the run command
Something like this:
Code:
public void run()
{
numTimes = 0;
quit = false;
while (!quit)
{
if (numTimes == 1234567)
{
quit = true;
}
numTimes++;
try
{
sleep(500);
}
catch(InterruptedException e) {}
}
} My other thread is launched on a timer, and simply grabs that number. That's all I want to do.
So here is the timer
Code:
Timer timer = new Timer();
myTask thetask = new myTask(_gdt);
timer.schedule(thetask, 5000, 10000); (_gdt) is the threaded object with the constantly updating integer value.
here is the run command in the myTask object
Code:
public void run()
{
UiApplication.getUiApplication().invokeAndWait(new Runnable()
{
public void run()
{
Dialog.alert(Integer.toString(_gdt.getTimes()));
}
});
} Now this all compiles just fine, but it hangs the system when I try to launch the app.
Any ideas?
Thanks all!