Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Apr 2005

    how to hide (no data) text

    Hello All!

    I reuse one form or list objects many times and remove and append some elements from/to them.
    I have the problem when I delete all elements in the form or list with deleteAll() method I got the "(no data)" on the phone screen. This text is shown until I add something with append() method to form or list (form or list has no any elements). It's not crusial for me, but it's annoing due "blinking" effect between removeAll() and append() actions. How to solve this problem?
    Thanks in advance.

  2. #2
    Registered User
    Join Date
    Feb 2004
    Yes i'm quite desperate to find an answer to this too.

    I have tried adding a spacer that is 0 by 0 then trying to delete all the items at size()-1 but that is causing problems for me too.

    Any help would be much appreciated.

  3. #3
    Regular Contributor
    Join Date
    Aug 2003
    Your choices are:

    1: - dont delete -> append, append first ..

    2: - use a new form/list each time, this works well for all phones except the sony ericcson t610.

    3: better yet, write your own list/form classes using Canvas or FullCanvas.

    This is what I did, total control, and no stupid bugs (that are not my fault

    If you do this, dont make your form class run its own thread .. this prooves to be more hassle than its worth, in that syncing the ending of 1 thread and the beginning of another can lead to problems if the user presses too many buttons too quickly.

    A better solution is to have your form class have form_tick() and form_paint(Graphics g) methods.

    Then have 1 single thread that chooses what paint method to call (game_paint, form_paint, list_paint .. etc).

    This is not really the java way, it is however the path to code that doesn't have huge numbers of odd side affects if you hit buttons too quickly, or behave oddly on some phones.

    Once I changed to this model, everything just worked

  4. #4
    Super Contributor
    Join Date
    Mar 2003
    Originally posted by alex_crowther
    This is not really the java way
    Maybe not, but it is the MIDP way


Posting Permissions

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