Page 1 of 6
Problema con combosearchbox/ problem combosearchbox
Posted: Sat Mar 23, 2013 1:58 am
by Leopoldo Blancas
Hola a todos...
Estando practicando con combosearchbox no me ejecuta mi aplicación... solo cambie de Archivo...
Gracias
Polo
*-------------------------------------------------------------------------------------------------------------
Hi all ...
While practicing with combosearchbox I run my application ... File change only ...
thanks
Polo
Re: Problema con combosearchbox/ problem combosearchbox
Posted: Sat Mar 23, 2013 2:33 am
by Leopoldo Blancas
el archivo...
Re: Problema con combosearchbox/ problem combosearchbox
Posted: Sat Mar 23, 2013 8:57 am
by Rathinagiri
Hi,
I do have come across this problem.
just add these lines before asort()
Code: Select all
for i := 1 to len( aMunicipios )
aMunicipios[ i ] := alltrim( aMunicipios[ i ] )
next i
I think Esgici can solve the problem once for all. I will also check.
Re: Problema con combosearchbox/ problem combosearchbox
Posted: Sat Mar 23, 2013 10:18 am
by esgici
rathinagiri wrote:...
I think Esgici can solve the problem once for all. ...
Sorry ...
I can't understood Spanish
Especially code written with Spanish identifiers and abbreviations

Re: Problema con combosearchbox/ problem combosearchbox
Posted: Sat Mar 23, 2013 11:02 am
by Pablo César
esgici wrote:Sorry ...
I can't understood Spanish
Especially code written with Spanish identifiers and abbreviations

But Polo has written in English too in his message.
What Mr. Rathinagiri is indicating is for you Esgici to apply Alltrim
ing in arrays before processing. This I think could be done in your combosearchbox source code.
Re: Problema con combosearchbox/ problem combosearchbox
Posted: Sat Mar 23, 2013 11:51 am
by esgici
Pablo César wrote:...
But Polo has written in English too in his message.
OK amigo,
Could you please explain to me what's the problem of Polo in this thread (combobox) ?
Re: Problema con combosearchbox/ problem combosearchbox
Posted: Sat Mar 23, 2013 12:03 pm
by Pablo César
Hi dear Esgici,
In order to work (in this Polo's case), after reading from lst file, which contains al lot of spaces in the file, probably by exporting from a dbf, then needing to apply procedure of the Rathinagiri indications:
Code: Select all
aMunicipios := HB_ATOKENS( MEMOREAD( "Municipios.lst" ), CRLF )
for i := 1 to len( aMunicipios )
aMunicipios[ i ] := alltrim( aMunicipios[ i ] )
next i
ASORT( aMunicipios )
After this, it's working pretty well. But needs to make Alltriming in each elements.
So, user before loading at combosearchbox, need to remove spaces. But our suggestion is to make this (as garantee) making in your combsearchbox source code. If you agree, ofcourse.
My other sugegestion is to implement in your source code a function which can read from a dbf and applying alreading the AlTrim in each element when constructing the array one. What do you think ?
Re: Problema con combosearchbox/ problem combosearchbox
Posted: Sat Mar 23, 2013 12:14 pm
by Pablo César
Amigo Esgici, if you do not what to make implements in your code, Polo only need to replace this line:
aMunicipios := HB_ATOKENS( MEMOREAD( "Municipios.lst" ), CRLF )
by these two lines:
Local aMunicipios:={}
AEval( hb_atokens( MEMOREAD( "Municipios.lst" ), CRLF ), { |cLine| AaDd( aMunicipios, AllTrim( cLine ) ) } )
Then it solves his problem.
Re: Problema con combosearchbox/ problem combosearchbox
Posted: Sat Mar 23, 2013 12:25 pm
by esgici
Olá Pablo
Are you sure that problem is trailing spaces ?
Re: Problema con combosearchbox/ problem combosearchbox
Posted: Sat Mar 23, 2013 12:35 pm
by Rathinagiri
Yes Esgici. It is because of trailing spaces.