×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Oct 2007
    Location
    Noida
    Posts
    152

    Question Sort Contact list

    Hi All,
    Well it has ben quite some time i have been posting here but not quite getting any results. neways lets not stop trying .

    I have a List item and i have populated it with all the contact names of my mobile phone.now i want to sort the names by perssing the key events. i.e. A for all the contacts starting with A and so on. now i have some logic that is doing it fine but the problem is that it is doing the same for onely once. please help me on this . or if anyone can tel me of some other logic.

    Code:
     protected void keyPressed(int keyCode) 
        {  
            char c = 'a';
            if (keyCode >= '2' && keyCode <= '9') 
            {
                c = this.toAlphabet((char)keyCode);
            }
            System.out.println(c);
            ObjSample1.SortListAccordingToKeyPress(c);
           -- getDisplay().setCurrent(ObjSample1.get_list1());  
            //Display.getDisplay()
            System.out.println("Hello");
          //  this.ObjSample1.run();
        }
    if i remove the line prefixed with -- then it is handling all the key press events else. it is not going more than once. i am not able to findout what the problem might be . please help

    thanks in Advance.

  2. #2
    Super Contributor
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,191

    Re: Sort Contact list

    This might be related to othe parts of your code. You might do something elsewhere which prevents the application to repond properly etc.
    (if I understand correctly the keyPressed method is called only once...right?)

    Hartti

Similar Threads

  1. Sort Contact database
    By bernie31 in forum Symbian
    Replies: 1
    Last Post: 2008-09-17, 09:59
  2. Enumarating contact list
    By shagishkumar in forum Mobile Java General
    Replies: 3
    Last Post: 2006-06-27, 05:34
  3. 6680 and bluetooth service profiles
    By ceruault in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2005-10-08, 22:24
  4. Bubble sort a list of linked objects!
    By hclemson in forum Symbian
    Replies: 2
    Last Post: 2005-05-15, 13:39
  5. Showing and accesing contact list library
    By djorge in forum Symbian User Interface
    Replies: 1
    Last Post: 2002-09-25, 11:01

Posting Permissions

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