New issue 15 by frwendl...@gmail.com: [NPC] Search as you type
http://code.google.com/p/rolgps/issues/detail?id=15
Hi,
A nice feature would be to add a incremental search system for the NPC
search.
To make it short, i wrote a small app showing this feature (in java
indeed), so i join it. Atm, the search routine is a bit resource hungry
(not optimized), but the idea is here. The code may be crappy - i'm not an
experienced java coder ;o)
I attach this app. To build it you'll need apache ant :
tar xvjf java_npc_gui.tar.bz2
cd java_npc_gui
ant
cd dist/
./npc.sh
Have fun,
-Sath.
Attachments:
java_npc_gui.tar.bz2 2.2 MB
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
Comment #1 on issue 15 by rhfixer: [NPC] Search as you type
http://code.google.com/p/rolgps/issues/detail?id=15
Indeed, it's a nice idea... But querying the database more often would be a
performance killer. I'm implementing a new library that can do cpu-hungry
queries a
little bit lighter, but I doubt I'll use it here.
What about search-as-you-type *after* you have typed 3 characters?
Thanks for your feedback!
> What about search-as-you-type *after* you have typed 3 characters?
It is already possible, it's just a value to change in the (uncommented,
unfortunatly) source code. I say uncommented, because i wrote it some times
ago for
learning purpose, it wasn't targetted for rolgps.
Look at Filltable() in Ui.java - it's just set to 1 char atm. Also, the
setCountRow
should be called before the if, i mean it should be like this :
[...]
this.model.setRowCount(0);
if (search.length() >= 3) {
[...]
And about performance, note that your NPC Locator requires only the name,
id and
realm of the NPCs in the SELECT, so it should be way less resource hungry
than it is
in this application.