Discussion Board

Results 1 to 10 of 10
  1. #1
    Registered User murugaprabum's Avatar
    Join Date
    Mar 2012
    Posts
    20
    I have almost 8000 items in a list box, from which the user can select one. I have used CAknSearchField component for the user to search from the list. The search functionality is very slow. So, I would like to perform the search operation myself. How do I override the default search method. ? Or are there any articles which describes how to optimize search in list box ??

  2. #2
    Nokia Developer Expert symbianyucca's Avatar
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    28,672
    Basically you would simply make a text box for search string, and then do your own logic to set the list box items.. You could indeed have a full array separately, and replace the array shown in list box with your own search results.

  3. #3
    Nokia Developer Moderator wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Mallorca, Holiday
    Posts
    27,683
    CAknSearchField seems to be created for unsorted lists. So it checks and compares every single list element as part of the filtering process. For 8000 elements it is probably slow indeed.
    Even if your list is a sorted one, I do not see a way for telling it to the search field. You will probably have to implement a custom mechanism as suggested by Jukka.

  4. #4
    Nokia Developer Champion vineet.jain's Avatar
    Join Date
    Jun 2008
    Location
    Noida,India
    Posts
    3,841
    Btw i utilized CAknListQueryDialog to display the list of elements(mine has ~5k list items) & its not that slow.

  5. #5
    Registered User murugaprabum's Avatar
    Join Date
    Mar 2012
    Posts
    20
    I was able to add a find pane to the list box. What I found in it is, it uses string matching to suggest items as the user types in. Is it possible to have more sophisticated search like partial string matching/fuzzy string matching. I have a list of 8000 city names, from which the user has to select one. The users type in the city name, and mispelling of a city name is a common scenario. What happens by the current implementation is, no city name is displayed if the user types in the wrong spelling. I would like to override this and show atleast some close suggestions to the typed in text. Nokia does this in the messaging application. It suggests very closely matched words, when user types in a misspelled word in sms. Can I use that functionality here ???

  6. #6
    Nokia Developer Moderator wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Mallorca, Holiday
    Posts
    27,683
    The predictive input (what you see when typing messages) is one thing. What listboxes and their search fields do is completely different. It is not configurable, that is why Jukka suggested implementing your own search field at the very beginning.

  7. #7
    Registered User murugaprabum's Avatar
    Join Date
    Mar 2012
    Posts
    20
    Can't I use PTI Engine API to get the predictive text functionality ????

  8. #8
    Nokia Developer Moderator wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Mallorca, Holiday
    Posts
    27,683
    You can, but it will not become a list.

  9. #9
    Registered User murugaprabum's Avatar
    Join Date
    Mar 2012
    Posts
    20
    Okay. I will custom implement it. I have some doubts regarding PTI Engine. I ran a sample code of it to find out the input modes supported by English language in my e63. It doesn't have EPtiEnginePredictive and EPtiEngineMultiTapping. Is there any option to load these modules in the run time ???

  10. #10
    Nokia Developer Expert Devnull's Avatar
    Join Date
    Sep 2011
    Posts
    381
    This could be a good template for a custom implementation.

Similar Threads

  1. list box with search box empty list text problem.
    By dinesh547 in forum Symbian User Interface
    Replies: 5
    Last Post: 2011-09-09, 14:42

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved