01-06-2010 07:45 PM - edited 01-06-2010 07:47 PM
I don't get it I've tried everything =/
synchronized(UiApplication.getApplication().getEventLock()){
//Run code
}
synchronized(UiApplication.getApplication().getAppEventLock()){
//Run Code
}
UiApplication.getUiApplication().invokeLater(new Runnable(){
public void run(){
//Run Code
}
}UiApplication.getUiApplication().invokeAndWait(new Runnable(){
public void run(){
//Run Code
}
}
Everything I try thorws the same "UI engine accessed without holding the event lock" error. Is there something I'm not trying or looking past?
01-06-2010 08:00 PM
Since those should work, I think we need to look elsewhere.
Is there a chance you are trying to update some other process's UI? For example, you are running in a call listener (i.e. under control of the phone application) and trying to update your own Screens?
01-06-2010 08:06 PM
peter_strange wrote:Since those should work, I think we need to look elsewhere.
Is there a chance you are trying to update some other process's UI? For example, you are running in a call listener (i.e. under control of the phone application) and trying to update your own Screens?
Yes I'm trying to update my app when the phone call is disconnected using the phone listener.
01-06-2010 08:10 PM
If you're sure you're running two processes here (I'm not sure here if you are or not), then you're going to need to use some sort of IPC like RuntimeStore or GlobalEvents to signal between processes.
01-06-2010 08:37 PM
Just to agree with ydaraishy, these will be running in two different processes, so you do need to use some Inter Process Communication. I would recommend you use Global Events, here is the KB article that should get you going on this:
What Is - Global Events and Global Event Listeners
Article Number: DB-00145
http://www.blackberry.com/knowledgecenterpublic/li