×

Discussion Board

Results 1 to 5 of 5

Thread: LWUIT Issue

  1. #1
    Regular Contributor
    Join Date
    Jan 2010
    Posts
    52

    LWUIT Issue

    Hey guys,

    I have a MIDlet running on a Nokia 6212 NFC device. I'm using LWUIT for my GUI.

    Lets say I have Form a and Form b.
    In some situations when I call b.show() when a is already displayed, there is no visual change in the MIDlet - form a remains on the screen BUT the commands of form b are active - lets say that the right soft key command in form a displays an alert that contains the text "FORM A" when it is pressed in form a, and the left soft key command in form b displays an alert that contains the text "FORM B" when it is pressed in form b - when form a in showed and I call b.show(), there is no change on the screen - form a remains shown. But, if I press the left soft key - the "FORM B" alert is displayed. I have a few threads (not GUI related) running on the system and I have a feeling that this is a sync problem. Anybody has an idea?

    Thanks!

  2. #2
    Registered User
    Join Date
    Oct 2009
    Location
    Noida
    Posts
    941

    Re: LWUIT Issue

    Instead of just calling b.show(), first set the form b as current form then call its show().

    thanks,
    Ekta

  3. #3
    Registered User
    Join Date
    Dec 2009
    Location
    Bangalore/Mysore, Karnataka, India.
    Posts
    43

    Re: LWUIT Issue

    HI,

    I had faced similar problem. I do not know why this happens.
    But to avoid this I decided to attach the Command Listener only after the form is visible.
    This avoids commands of Form-B getting activated in Form-A.
    Code:
    b.show();
    while(!b.isVisible());
    b.addCommandListener(cmdLtr);
    You might like go through these links to know more about threads in LWUIT.
    Link1 and Link2.
    -Roopesh.
    (http://trivialdust.blogspot.com/)

  4. #4
    Regular Contributor
    Join Date
    Jan 2010
    Posts
    52

    Re: LWUIT Issue

    Quote Originally Posted by ektasrv View Post
    Instead of just calling b.show(), first set the form b as current form then call its show().

    thanks,
    Ekta
    Hey,

    How do I set form b to be the current form? LWUIT's Display doesn't have a setCurrent like the MIDLet's Display class..

  5. #5
    Regular Contributor
    Join Date
    Jan 2010
    Posts
    52

    Re: LWUIT Issue

    Hey guys,

    I still haven't been able to figure this out. There is some kind of a sync problem and I can't seem to prevent it nor to predict when it will happen.
    Do you have any example of safe practice with regards to threading in LWUIT? I really don't know what to do as this issue is very weird..

    Thanks!

Similar Threads

  1. S60 5th Beta SDK Issue?
    By Nitesh Bhardwaj in forum General Development Questions
    Replies: 5
    Last Post: 2011-01-08, 21:54
  2. Nokia 6300 Bluetooth Connectivity Issue
    By flar74 in forum Bluetooth Technology
    Replies: 1
    Last Post: 2008-04-03, 20:19
  3. Realtime Fishing LBS Content's becoming a Hot Issue.
    By viva99kim in forum News and Announcements
    Replies: 1
    Last Post: 2008-02-29, 23:49
  4. Solved: USB IRDA issue with 3360 and 6360 for Win98 & Win2K
    By Vicman in forum PC Suite API and PC Connectivity SDK
    Replies: 1
    Last Post: 2003-05-07, 05:34

Posting Permissions

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