IllegalArgumentException on PopScreen
When I try to close a Screen, I am receiving an IllegalStateException.
What I have noticed, however, is that when I push this screen and then close out of it (pop), it works fine. However, if I push the screen, click on one of the buttons on my screen, and then close out of the screen, I receive the IllegalStateException. This is even true if I click on a button that does not have a fieldchangelistener associated with it.
Here is my stack trace:
Can anyone offer me any help? Thanks!
The subject of your post says illegal argument exception and the body of your post says illegal state exception. I'm going to assume your problem is illegal state exception. You will encounter this exception a lot you're not familiar with the concept of the event thread.
This article explains it pretty well: BlackBerry UI Threading - The Very Basics - Thinking BlackBerry
Basically, when you launch your application, you probably use the UiApplication.enterEventDispatcher() method. Whichever thread this method is called on becomes the event thread, and it is the only thread that is allowed to directly modify the UI of your application.
If you attempt to modify the UI from a different thread, you'll receive an illegal state exception.
The way to overcome this problem is to use the following technique:
|All times are GMT -5. The time now is 05:02 AM.|
Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.