01-28-2009, 08:11 PM
Join Date: Mar 2008
Location: Austin, TX
Post Thanks: 0
Thanked 34 Times in 33 Posts
I assume that you are basically implementing the Observer pattern in your Model class?
Since the Model is not running in the main event thread, then any attempt to update UI components from the Listener method (in the View class) will result in an exception. you need to encapsulate the required UI update in a Runnable class, and use UiApplication.invokeLater() to queue the command so that it executes in the main UI enent thread.
See the API docs for Runnable and UiApplication.invokeLater().