×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Nov 2009
    Posts
    4

    SortedList with Filter S60 3rd FP2

    Hi,

    I was working with eSWT SortedList Widget, and seems when used with FILTER style the getFocus() method is not returning the correct Values.

    When a filter condition is entered in the filter text box, the SortedList displays the filtered out list correctly, but when getFocus() method is used to get the selected item from the filtered list, its not giving the correct item, instead its taking index of the selected item, and returning the item at the index from the whole list.

    For instance, if there are 100 numbers from 1 to 100 in the list and when i use filter condition with 0, all items with 0 in them are filtered and displayed but getFocus is not giving correct results.

    Is it a bug with SortedFilter, with no Fix available. Or is there other way getting a selected item. A String array is used to populate SortedList box. There are around 1250+ items in the list.

    Any help is much appreciated.

    Happy New year
    thanks
    Phani

  2. #2
    Registered User
    Join Date
    Nov 2007
    Posts
    8

    Re: SortedList with Filter S60 3rd FP2

    Hi,

    Unfortunately this is an old bug in S60 3rd edition FP2.
    It has been fixed some time ago. In my 3.2 device I cannot reproduce it.

    As workaround, could you please try SortedList.getSelection() ?

    Code:
            final SortedList sortedList = new SortedList(shellTest, SWT.V_SCROLL, SortedList.FILTER);
            Command cmd = new Command(sortedList, Command.GENERAL, 0);
            cmd.setText("Get selected item(s)");
            cmd.addSelectionListener(new SelectionListener() {
                public void widgetDefaultSelected(SelectionEvent ev) {
                }
    
                public void widgetSelected(SelectionEvent ev) {
                    MessageBox dlg = new MessageBox(shellTest);
                    String s = "";
                    String sel[] = sortedList.getSelection();
                    for (int i = 0; i < sel.length; i++) {
                        s += sel[i] + "\n";
                    }
                    dlg.setMessage(s);
                    dlg.open();
                }
            });

  3. #3
    Registered User
    Join Date
    Nov 2009
    Posts
    4

    Re: SortedList with Filter S60 3rd FP2

    thanks Petru, it was also giving me problems but will confirm it again after testing with your code.

    Cheers
    Phani

Similar Threads

  1. LAC on S60 3rd Ed FP2
    By overlaymedia in forum Mobile Java General
    Replies: 10
    Last Post: 2010-07-29, 13:40
  2. Python for S60 1.9.3 released
    By tvijayan in forum Symbian
    Replies: 40
    Last Post: 2009-04-03, 15:00
  3. Starting a Process AND autostart on S60 3rd FP2
    By emailatravi in forum Symbian
    Replies: 6
    Last Post: 2008-10-23, 04:01
  4. Replies: 0
    Last Post: 2008-10-02, 14:17
  5. Title pane rect in S60 3rd fp2
    By mobi1 in forum Symbian
    Replies: 2
    Last Post: 2008-06-24, 09:55

Posting Permissions

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