×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Mar 2005
    Posts
    23

    Question why not List.MULTIPLE fire SELECT_COMMAND event?

    hi,everyone

    i define a List.MULTIPLE,in emulator of NOKIA S60 it can fire SELECT_COMMAND event , but on a real mobile of nokia 6630 and 6600 it can't fire the event ,but if i change the list to IMPLICIT type the it can fire the event.Why ? it's crazy!

    please help, thank you very much!

  2. #2
    Super Contributor
    Join Date
    Mar 2003
    Location
    Israel
    Posts
    2,280
    If the emulator is firing a SELECT_COMMAND then that looks like a bug on the emulator. Only IMPLICIT lists are supposed to fire SELECT_COMMAND. For the rest of the types you need to add your own Commands.

    shmoove

  3. #3
    Registered User
    Join Date
    Mar 2005
    Posts
    23
    shmoove, thank you for your reply

    however , please tell me how do you know that's a bug of emulator instead of a bug of 6630, and are you sure "Only IMPLICIT lists are supposed to fire SELECT_COMMAND." ?

    please give me a link to the document about this ,much appreciated!!

    my 6630's firmware version is : 3.45.113 ,04-01-05

  4. #4
    Super Contributor
    Join Date
    Mar 2003
    Location
    Israel
    Posts
    2,280
    In the javadoc of the List class there is the folowing sentence:
    Selection in EXCLUSIVE and MULTIPLE Lists

    The select operation is not associated with a Command object, so the application has no means of setting a label for it or being notified when the operation is performed.
    shmoove

  5. #5
    Registered User
    Join Date
    Mar 2005
    Posts
    23
    thank you again ,shmoove

    i've read the doc , you are right!

    will you demonstrate a little , as you metioned, how to "add your own Commands" ?

    my problem is , when a user traversing among list items , i can't know which item is highlighted, i can only get those selected by using getSelectedFlags(). If an item is highlighted but not selected , i don't know which one it is!

  6. #6
    Super Contributor
    Join Date
    Mar 2003
    Location
    Israel
    Posts
    2,280
    I don't know of any way to know which item is highlighted.

    When I said "add your own commands" I meant using addCommand() and setCommandListener() so when the user is done selecting from the list he uses this command to trigger an action from the MIDlet.

    shmoove

Posting Permissions

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