Problema con combosearchbox/ problem combosearchbox
Moderator: Rathinagiri
-
- Posts: 388
- Joined: Wed Nov 21, 2012 7:14 pm
- Location: México
Problema con combosearchbox/ problem combosearchbox
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
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
-
- Posts: 388
- Joined: Wed Nov 21, 2012 7:14 pm
- Location: México
Re: Problema con combosearchbox/ problem combosearchbox
el archivo...
- Attachments
-
- aa.rar
- (14.61 KiB) Downloaded 329 times
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: Problema con combosearchbox/ problem combosearchbox
Hi,
I do have come across this problem.
just add these lines before asort()
I think Esgici can solve the problem once for all. I will also check.
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
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
- esgici
- Posts: 4543
- Joined: Wed Jul 30, 2008 9:17 pm
- DBs Used: DBF
- Location: iskenderun / Turkiye
- Contact:
Re: Problema con combosearchbox/ problem combosearchbox
Sorry ...rathinagiri wrote:...
I think Esgici can solve the problem once for all. ...
I can't understood Spanish
Especially code written with Spanish identifiers and abbreviations
Viva INTERNATIONAL HMG
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
Re: Problema con combosearchbox/ problem combosearchbox
But Polo has written in English too in his message.esgici wrote:Sorry ...
I can't understood Spanish
Especially code written with Spanish identifiers and abbreviations
What Mr. Rathinagiri is indicating is for you Esgici to apply Alltriming in arrays before processing. This I think could be done in your combosearchbox source code.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
- esgici
- Posts: 4543
- Joined: Wed Jul 30, 2008 9:17 pm
- DBs Used: DBF
- Location: iskenderun / Turkiye
- Contact:
Re: Problema con combosearchbox/ problem combosearchbox
OK amigo,Pablo César wrote:...
But Polo has written in English too in his message.
Could you please explain to me what's the problem of Polo in this thread (combobox) ?
Viva INTERNATIONAL HMG
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
Re: Problema con combosearchbox/ problem combosearchbox
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:
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 ?
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 )
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 ?
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
Re: Problema con combosearchbox/ problem combosearchbox
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.
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.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
- esgici
- Posts: 4543
- Joined: Wed Jul 30, 2008 9:17 pm
- DBs Used: DBF
- Location: iskenderun / Turkiye
- Contact:
Re: Problema con combosearchbox/ problem combosearchbox
Olá Pablo
Are you sure that problem is trailing spaces ?
Are you sure that problem is trailing spaces ?
Viva INTERNATIONAL HMG
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: Problema con combosearchbox/ problem combosearchbox
Yes Esgici. It is because of trailing spaces.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.