Thank you for visiting the BlackBerry Support Community Forums.
BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)
BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.
"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."
- Kevin Michaluk, Founder, CrackBerry.com
Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.
09-18-2010 03:42 AM
Can someone help me with Progress Dialog till I get the data from Http Connection?
I have tried to use Status.show but how will I dismiss that once I have the data. Once I have the data I want to update UI. I think it should be the combination of Thread and UiApplication.getApplication.invokelater, but if someone can guide me in the right direction then it will be of great help.
Solved! Go to Solution.
09-20-2010 02:44 AM - edited 09-20-2010 02:45 AM
Thanks for pointing me to that tutorial. Why is the call like runThis.run() method. start() method of thread should be called and not directly its run() method in PleaseWaitPopUpScreen.
Can anyone explain me this? Its a bit confusing so any clarification will be of great help.
09-20-2010 04:07 AM
As it says in the referenced article
"applications are not allowed to block the Event Thread".
You might find this useful:
09-22-2010 02:28 AM
Thanks for pointing to that video, but I understand what is Event Thread.
I wanted to know why the meaning of runThis.run() being called in "PleaseWaitPopupScreen". There's no meaning of implementing Runnable then if we are directly calling its run() method rather than starting thread with start() method. And I think there's no need for implementing Runnable in GetURL since the popup is displayed in another thread and then we call the URL and then popup is removed.
Anyways that tutorial helped in solving my problem.
09-22-2010 04:41 AM
What is GetURL?
This statement is not correct:
"There's no meaning of implementing Runnable then if we are directly calling its run() method"
I recommend that you review the API and looks for things that implement Runnable.
Classes implement Runnable, so that the class can be used in other processing and that processing knows it can execute the supplied classes run method. In the KB article, the Runnable is passed in to showScreenAndWait() and a separate Thread is created in that processing. Since the showScreenAndWait() processing creates a separate Thread, it does not need to be passed in a complete Thread, it only needs to know how to run the code, so Runnable is perfect.
You could pass in to showScreenAndWait() a Thread, a MenuItem, a TimerTask, or anything else that implements Runnable.
The same concept (passing a Runnable) is used with the standard
Note also this statement is not 100% accurate::
"we call the URL"
It is the Thread created by showScreenAndWait() that invokes the Runnable. I think by 'we' in the above you meant your own processing.
Hope that clears up the mystery.