FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour XBrowse AutoSort Case Sensitive
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
XBrowse AutoSort Case Sensitive
Posted: Mon Jan 19, 2015 10:42 AM
Mr. Rao

Tengo un array con valores en mayusculas y minusculas
Quiero ordenar mi array sin tener en cuenta si el valor est谩 en mayusculas o en minusculas y poder buscar en dicho array (Seek Incremental)
Al definir mi XBrowse con la cla煤sula AUTOSORT me ordena el array pero primero los valores con maysculas y despues los valores en minusculas (normal)
La solucion es ordenar el array antes:
Code (fw): Select all Collapse
ASort( aTabla,,, { | x, y | if( Lower(x[ 1 ]) < Lower(y[ 1 ]), .T., .F. ) } )

Mi pregunta: 驴como puedo implementar la busqueda incremental sin tener en cuenta si el valor est谩 en mayusculas o en minusculas?

Google Translate
I have an array with values in case sensitive
I want to sort my array regardless of whether the value is in uppercase or lowercase and be able to search in that array (Seek Incremental)
By defining my xBrowse with clause autosort ordered me but first array values to uppercase and lowercase values after (normal)
The solution is to sort the array before:
Code (fw): Select all Collapse
ASort( aTabla,,, { | x, y | if( Lower(x[ 1 ]) < Lower(y[ 1 ]), .T., .F. ) } )


My question: how I can implement incremental search regardless of whether the value is in uppercase or lowercase?

Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: XBrowse AutoSort Case Sensitive
Posted: Mon Jan 19, 2015 10:57 AM
Gracias, creo que lo he encontrado
Code (fw): Select all Collapse
oCol:lCaseSenstive ( default .f. )


viewtopic.php?f=16&t=17698&p=92423&hilit=XBrowse+case+sensitive#p92423

Desde Diciembre / 2009 :-) :-) :-)
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: XBrowse AutoSort Case Sensitive
Posted: Mon Jan 19, 2015 11:19 AM
Cuando lCaseSensitive lo activo en las dos columnas, al cambiar de columna no me funciona

When lCaseSensitive so active in the two columns, changing column does not work for me

Code (fw): Select all Collapse
.../...
聽 聽 WITH OBJECT oFunList
聽 聽 聽 :aCols[1]:lCaseSensitive:= .T.
聽 聽 聽 :aCols[2]:lCaseSensitive:= .T.

.../...


Al principio del xbrowse hay items con la columna "Tipo" asi -> function

At the beginning of xBrowse there items to column "Tipo" -> function

Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: XBrowse AutoSort Case Sensitive
Posted: Mon Jan 19, 2015 01:57 PM

By default oCol:lCaseSensitive is FALSE.
In this case character values are sorted like this:

aaaaa
BBBBB
cccccc
DDDD

If we set oCol:lCaseSensitive := .T. then the char values are sorted like this:

BBBBB
DDDDD
aaaaa
ccccc

I tested with the latest version and the sorting is working correctly as above.
IMPORTANT: Please do not assign your own bSeek.

If in your version it is not working correctly, please indicate your FWH version.

Regards



G. N. Rao.

Hyderabad, India
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: XBrowse AutoSort Case Sensitive
Posted: Mon Jan 19, 2015 02:33 PM
Mr Rao

He quitado el ASort que ordenaba el array
He quitado las instrucciones ::aCols[1]:lCaseSensitive := .T.
He a帽adido el parametro .T. en las instrucciones oBrw:SetArray( aTabla, .T.)

Parece que funciona bien, sigo haciendo pruebas, pero...
Al entrar la primera vez el array aparece en su orden natural
Funciona al pulsar sobre la cabecera de la columna
Despues ya funciona bien incluso cambiando de columna

He de ordenar el array antes de realizar el :SetArray ?

Gracias por su interes y tiempo
Uso Fwh 15.01

I removed the aSort ordering the array
I removed the instructions :: aCols [1]: lCaseSensitive: = .T.
I added the parameter .T. in the instructions oBrw: SetArray (aTable, .T.)

It seems to work well, keep doing tests, but ...
Entering the first time the array is listed in their natural order
Powered by clicking on the column header
And works well even after changing column

I have to sort the array before performing: SetArray?

Thank you for your interest and time
Use FWH 15.0
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces

Continue the discussion