[posted back to list and trimmed] Varun Khaneja wrote: > On 8/7/07, Jim George <[EMAIL PROTECTED]> wrote: >> On 8/7/07, Dave Howorth <[EMAIL PROTECTED]> wrote: >>> Jim George wrote: >>>> It may not be exactly what you want, but gtk_entry_set_completion might >>>> help. >>> It looks interesting. I've found the page in the reference manual and it >>> says lots of things that sound intriguing but I'm having trouble >>> grasping exactly what a GtkEntryCompletion can do :( Are there any >>> tutorials or examples to help me understand what it's capable of? >>> >>> Cheers, Dave >> >> Here's a quick example: >> ... > > Hi Jim, > > While I was reading through your reply to Dave, I said to myself, wow > that's one really useful user interface practice. Great! > > What I thought of as an extension to this is: If the list is not huge > to start with, maybe you could popup the names that match not just the > beginning, but anywhere in the entire string. > The question then rises, would it really be of any use? From my habits > (or ability to remember and recall) it happens quite often that I > remember the middle or end part of the name, but not the starting. > > There is a firefox extension that does something similar for typing > URLs in the address box: myurlbar_a > > You could give it a thought, maybe.
I tried this with my half-million choice list :) It seemed it could be useful if you can only vaguely remember what you're looking for, but there was a practical problem for me. Because I'm truncating the completion list, it sometimes happens that the desired choice never appears in the list. My list is of taxonomy entries, so for example suppose you want the genus 'Homo'. It turns out that there are so many entries with 'homo' somewhere in them that sort alphabetically before H that the term never appeared. So in my case the strategy is no good. I suppose I could have gone on to add a more clever ordering algorithm but that seems overcomplicated. As it is, I still have to use a regex because some of the names start with ' or ( or other bizarre characters that people will never be able to guess. So I do allow the typed in string to match either at the beginning or from the second character. The bottom line is that the exact algorithm is likely to depend on the details of the dataset and that it's fairly easy to add this type of feature to your application. Cheers, Dave _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list