×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    Apr 2003
    Posts
    184

    How to know when a setCurrent take effect

    How can I know or be notified when a call for Display.setCurrent take effact?

  2. #2
    Registered User
    Join Date
    Mar 2003
    Posts
    20
    In a Canvas subclass, you can override hideNotify ad showNotify.

    Displayable itself only has an isShown method.

    If you want to get complicated, you can use an invisible Canvas as a gatekeeper. See AlertRouter in this article by Eric Giguere:

    http://wireless.java.sun.com/midp/ttips/multialerts/

  3. #3
    Regular Contributor
    Join Date
    Apr 2003
    Posts
    184
    Many thnaks for your answer.
    The problem is that I use Forms and Lists and not Canvas.
    Any suggestions for Forms?

  4. #4
    Registered User
    Join Date
    Jul 2003
    Location
    Finland, Tampere
    Posts
    1,113
    I use Display.callSerially(Runnable r)

    It calls your code "soon after completion of the repaint cycle".
    In particular right after showing your Form or List.

Posting Permissions

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