| Reply | « Previous Thread | Next Thread » |
|
hay friends,
I am creating a selection list,,, search_field=1, then if i type "p" then items starting with p will only being able to see in list... BUT if i type a irrelevant alphabate for e.g. "z" there are no items starting with "z" hence no item will be available in list.... still if i press "ok" (Left soft key) a blank item got selected... As i am watching my selection in listbox ....a blank field has got selected.. it is a bug ...isn't it? Regards Girish Don't allow your energy to be drained away by worrying about what others will think. Simply be your authentic best, and keep in mind that what anyone else thinks about you is not your concern. |
|
Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
Offline
Forum Nokia Champion
|
|
I don't think it's a bug. Actually it can even be considered a feature. If the user presses "OK" when there are no items found, the index returned is -1. That tells you that there were no items shown. There's nothing wrong with that, in my opinion.
|
|
Quote:
it returns -1 is correct. but it is selecting last item in my list... e.g. [a,b,c,d] have indexes a=0,b=1,c=2,d=3 now whats happening here; for no search field item it selects -1 and shows me "d" in yhe listbox. as d=-1 then isn't it a bug. Regards Girish Don't allow your energy to be drained away by worrying about what others will think. Simply be your authentic best, and keep in mind that what anyone else thinks about you is not your concern. |
|
hay bogdan ,
even check in windows python shell z=[u"a",u"b",u"c",u"d"] now z[0]=a and z[-4]=a z[-1]=d etc. etc. means reverse indexing is also going on .... is it correct as a programming point of view? as -1 return means no selection or no relevant items in list... then why this default selection ocuring? regards Girish Don't allow your energy to be drained away by worrying about what others will think. Simply be your authentic best, and keep in mind that what anyone else thinks about you is not your concern. |
|
Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
Offline
Forum Nokia Champion
|
|
The reverse indexing is useful in many situations, but not in this one. I guess you can check what index is returned after the user presses "OK". If it's -1, display a message or don't do anything (it's up to you). If it's other than -1, use [u"a",u"b",u"c",u"d"][index] or whatever you need to do.
|
|
ya that i have managed...
so this is not a bug!!! i am surprised!!!!since this is totally new to me.... Regards Girish Don't allow your energy to be drained away by worrying about what others will think. Simply be your authentic best, and keep in mind that what anyone else thinks about you is not your concern. |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| EEventKey + listbox + search field | egeri | Symbian User Interface | 16 | 2009-06-09 11:26 |
| Search Field - KERN EXEC 3 | Kavit Patel | General Symbian C++ | 6 | 2008-09-17 13:59 |
| Can we search joker files in a list? | bakidilek | Python | 4 | 2008-06-28 18:11 |
| Search Field | vvsnaresh | General Symbian C++ | 4 | 2005-08-30 08:56 |
| List item selection | SanDan | Mobile Java General | 2 | 2003-05-06 11:57 |