I tried using thread.If a string is been assigned to a variable then the result is been got in the MIDlet. But if a text box or a text field is used then the value is not been retrieved and is not invoking the JSP.
When the Midlet runs it shows a warning like
Warning: To avoid potential deadock,operations that may block,such as networking should be performed ina different thread than the commandAction() handler.
Then i tried creating two classes.But still it shows the same warning.
Hello To avoid the warning u should write this in a separate thread,ie, run().The first query is not very clear tome. It seems that u want to retieve the strings in a text box or in a text field. To get the strings in a text box or in a text field, use getString().
Hi Sowmya, I hope that you are using Sun Wireless Tool Kit and so you would be facing this problem. The Best way to evade this problem..is that when ever you try to react to OK command...just span a New thread....as opposed to opening a Network Connection in the CommandAction Listener. And also rather than creating a new Inner Class make that Midlet implement Runnable and then just in the CommandListener action..just span a new thread and in the new Thread do the Networking Stuff......This is the Way I have done it..It worked for me. For Ex
Do the coding in the Run Method...
This is what i have done.....Ranchers!!! Do tell me if I am wrong..
Thanks, Chaitanya V
All of life is a contant education - Eleanor Roosevelt. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database