×

Discussion Board

Results 1 to 8 of 8

Thread: event firing

  1. #1
    Regular Contributor
    Join Date
    Jun 2009
    Posts
    179

    Exclamation event firing

    i have scheduled to fire an event on fire key , but the same event is also firing on left and right key also , the code is written in fire key only. how can i correct it .

    thanks and regards
    Arunesh

  2. #2
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,085

    Re: event firing

    Check the keycodes in the keypress and filter out the left & right softkey events.

    thanks,
    ~Amitabh

  3. #3
    Regular Contributor
    Join Date
    Jun 2009
    Posts
    179

    Exclamation Re: event firing

    it will be very kind of you if you can tell me how to filter those keys , i have to perform this action in the "FIRE" key only .

    thanks and regards
    Arunesh

  4. #4
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,085

    Re: event firing

    i have scheduled to fire an event on fire key , but the same event is also firing on left and right key also , the code is written in fire key only. how can i correct it .
    Paste the code block where you are "checking the Fire key" and fireing the event, we will correct it.

    thanks,
    ~Amitabh

  5. #5
    Regular Contributor
    Join Date
    Jun 2009
    Posts
    179

    Exclamation Re: event firing

    the code is some thing like this

    case eMagineMidlet.Key_FIRE:

    if (isMainMenu) {
    System.out.println("program reached here ");
    Alert alt = new Alert("Info");
    alt.setString("City already exits");
    alt.setTimeout(3000);
    midlet.dis.setCurrent(alt);

    }

    futher i have nothing to do at left and right press when the value of boolean "isMainMenu" is true.


    when i am using fire key , the event is firing , but the same event is firing at left and right key fire

    kindly help me .

    thanks and regards
    Arunesh

  6. #6
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,085

    Re: event firing

    You are missing the break; in your switch case after this FIRE event handling.

    case eMagineMidlet.Key_FIRE:

    if (isMainMenu) {
    System.out.println("program reached here ");
    Alert alt = new Alert("Info");
    alt.setString("City already exits");
    alt.setTimeout(3000);
    midlet.dis.setCurrent(alt);

    }
    break;

    thanks,
    ~Amitabh

  7. #7
    Regular Contributor
    Join Date
    Jun 2009
    Posts
    179

    Re: event firing

    i m checking lot of conditions in this , and applying break at the last .... is this the reason

    Arunesh

  8. #8
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,085

    Re: event firing

    may be.

    thanks,
    ~Amitabh

Similar Threads

  1. Replies: 35
    Last Post: 2009-12-03, 14:22
  2. Replies: 2
    Last Post: 2009-01-21, 05:13
  3. Help me for touch Screen Event Handling
    By nil.bagul in forum Mobile Java General
    Replies: 1
    Last Post: 2008-03-28, 11:22
  4. CLogEvent problem
    By silviuccia in forum Symbian
    Replies: 2
    Last Post: 2006-12-22, 15:28
  5. Replies: 0
    Last Post: 2006-04-27, 15:21

Posting Permissions

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