Page 2 of 3

Posted: Thu Aug 10, 2006 7:12 pm
by Xombie
Would you try with this updated version?

http://www.seijin.net/Storage/Code/Autocomplete.pb

Posted: Thu Aug 10, 2006 10:43 pm
by kinglestat
that was fast work
yes worked straight through
well done

KingLestat

Posted: Thu Aug 10, 2006 11:33 pm
by kinglestat
I have one more question
I've noticed that pressing the backspace the autocomplete does not find any occurances, even if there are matches

is it supposed to be like that ?

I assume that if a user made a mistake by overtyping, pressing the backspace would help to autocomplete

cheers

KingLestat

Posted: Fri Aug 11, 2006 12:07 am
by Xombie
Try again to see if this is the behavior you're looking for ...

http://www.seijin.net/Storage/Code/Autocomplete.pb

Posted: Fri Aug 11, 2006 8:19 am
by kinglestat
perfect
do you EVER sleep ?

you're in for a couple of cases of beer should you visit my country
cheers

KingLestat

Posted: Fri Aug 11, 2006 8:54 am
by Michael Vogel
Sorry to ask - I loaded the last version, inserted the Main.pb from the first mail and did it a try...

click in the middle gadget
press 'J' ('Jack' appears, 'ack' is highlighted)
press backspace ('Jack' gets highlighted)
press backspace ('Jack' stays highlighted, shouldn't it be removed?)

Posted: Fri Aug 11, 2006 3:57 pm
by Xombie
Oh yes, I sleep. See? I didn't get to Mr. Vogel's bug report until this morning.

http://www.seijin.net/Storage/Code/Autocomplete.pb

great piece of code

Posted: Mon Feb 19, 2007 2:54 pm
by quasiperfect
hi !

great job on the autocomplete function
i have only one small problem it seams is limited to 2607 items in the array
any update that would support more items or is just me with the 2607 limit ?

this is the code

Code: Select all

Dim Array01.s(0)
For x=0 To 2607
ReDim Array01.s(x)
Array01(x)=randomstring(10)
Next x
i get a invalid memmory acces at this line of code

Code: Select all

MatchText = PeekS(@*Position\FakeString[iLoop])

Posted: Tue Feb 20, 2007 4:03 pm
by Xombie
Hey. I'd have to see the actual code you're using or at least a small example that exhibits the same behavior.

In the meantime, can you try the updated code listed here:

http://www.purebasic.fr/english/viewtopic.php?t=23248

Also, is there any particular reason you're continuously redim'ming the array in the loop?

Take care.

Posted: Sat Jul 07, 2007 9:42 pm
by Karbon
Hey Xombie -- I just tried out this code and found that if you ac_SetAutocomplete() on a combo that's on a secondary window then close the window with CloseWindow() and re-open it, re-call ac_SetAutocomplete() that it doesn't work.

Will it only work once for any Window?

Posted: Sun Jul 08, 2007 7:35 pm
by Karbon
Ouch.. Additionally if you call ac_RemoveAutocomplete() on a combo then close the window it's on there is a nasty little crash (references line 778 in the autocomplete code I have. It's the return of the _ac_HandleComboEvents() procedure..

Posted: Sun Jul 08, 2007 9:40 pm
by freak
Why not just let Windows handle the autocomplete stuff ? (if you can require WinMe or newer)

http://www.purebasic.fr/english/viewtopic.php?t=24721

Posted: Mon Jul 09, 2007 12:36 am
by Karbon
Ahh.. I hadn't found that post..

I'll reply there with a question.

Posted: Mon Jul 09, 2007 2:46 pm
by Xombie
Karbon - if you're still interested in using these procedures can you give me short code examples for the crashes? I'll get it fixed for you.

Posted: Mon Jul 09, 2007 2:48 pm
by Karbon
I switched it around to use Freak's Win API implementation..

However, I just put the autocomplete on a combo that was on a window that users can close and open. Once I opened it and the autocomplete was assigned, if I closed and re-opened it the autocomplete never worked again.