You Are Here:

Community: Developer Discussion Boards

#1 Old Displaying Alert in MIDP1 - 2004-12-26, 17:08

Join Date: May 2003
Posts: 47
anand_amarsh
Offline
Registered User
I am writing an application which connects to a server to get some information. Following is the what I intend to do:
screen 1 : Form asking user input
screen 2 : Canvas displaying "Connecting..."
screen 3 : Results Canvas
if the server is down, I want the application to display an Alert("Server Unreacahble") after screen 2 times out, and the control then returns to screen 1.
The problem is that when I execute code similar to the following :
...
if(timeout){
Display.setCurrent("Server Unreacahble");
Display.setCurrent(screen1);
}else
Display.setCurrent(screen3);

the screen changes from screen2 to screen1 without showing the alert. it appears that the switching from screen2 to the alert and then to screen1 is too quick, and hence the alert is replaced by screen1 before it (alert) can be seen.

can someone please help me with this problem of displaying alert for a certain duration beofre another screen is displayd.

please suggest me something other than using a custom alert (say, a splash screen), since i want to use the "system look and feel" and hence would prefer using high level alerts.

thanks in advance
Reply With Quote

#2 Old 2004-12-27, 09:16

Join Date: Mar 2003
Posts: 2,280
Location: Israel
shmoove
Offline
Forum Nokia Champion
Use the setCurrent(Alert a, Displayable next) method.

shmoove
Reply With Quote

#3 Old 2004-12-28, 08:08

Join Date: May 2003
Posts: 47
anand_amarsh
Offline
Registered User
thanks a lot. we often miss the simplest solution when we are working on complex problems for sometime :)
i wouldlike to draw your attention to the other problem I am facing. would be extremely grateful if you could have a thought :

(topic : Dialling a phone number from J2ME midlet )

http://discussion.forum.nokia.com/fo...threadid=54140

best regards and greatest thanks
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia