Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    May 2003

    Displaying Alert in MIDP1

    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 :
    Display.setCurrent("Server Unreacahble");

    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

  2. #2
    Super Contributor
    Join Date
    Mar 2003
    Use the setCurrent(Alert a, Displayable next) method.


  3. #3
    Registered User
    Join Date
    May 2003
    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 )


    best regards and greatest thanks

Posting Permissions

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