Forums » Community Projects

tab complete

Feb 14, 2021 draugath link
Here's my attempt at a function to return the next name based on a given partial name.

https://pastebin.com/EHw4DFbt

This function could probably be integrated with code from TabReply++ to provide a full, cycled tab-complete interaction. The main problem is going to come with mobile users. Because the tab button reaction is tied to an IUP button that's squirreled away in the hard to access Virtual Keyboard. That doesn't mean it's insurmountable. I have some test code that can get reference to the VKB, I've just never tried actually doing anything with it.

One point of improvement that might be worthwhile is perhaps storing the time a name was last seen and change the sorting to sort by time seen. However, this of course could introduce client lag if it happens too frequently or is too intensive an operation.

EDIT: 2/19/2021
I've updated the code. The original method of storing list indexes for quick reference was somewhat flawed. Names are now stored in smaller tables which should speed up lookup times if the number of names grows to be too big. Further, it now has a generator which can be used in for loops.