Now that I'm back in the office, I can confirm what I said above.
But please do read this thread:
How to paste 100% FORMATTED Source Code In Your Forum Posts
It is so much easier to take in the structure of code if it is formatted the way we have all come to expect.
In any case try something like this:
Code:
protected void onDisplay(){
super.onDisplay();
Thread t1 = new Thread(new Runnable() {
public void run() {
UpdateStatusBar("Checking for latest version");
CheckVersion();
UpdateStatusBar("Monitoring . . .");
}
});
t1.start();
} If your UpdateStatusBar method does not hold the event lock, you should surround the calls to it in the thread with synchronized(UiApplication.getEventLock()) like this:
Code:
protected void onDisplay(){
super.onDisplay();
Thread t1 = new Thread(new Runnable() {
public void run() {
synchronized(UiApplication.getEventLock()) {
UpdateStatusBar("Checking for latest version");
}
CheckVersion();
synchronized(UiApplication.getEventLock()) {
UpdateStatusBar("Monitoring . . .");
}
}
});
t1.start();
}