XBrowse AutoSort Case Sensitive

XBrowse AutoSort Case Sensitive

Postby cnavarro » 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: Select all  Expand view

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: Select all  Expand view

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?

Image
Last edited by cnavarro on Mon Jan 19, 2015 11:06 am, edited 2 times in total.
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
User avatar
cnavarro
 
Posts: 6501
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: XBrowse AutoSort Case Sensitive

Postby cnavarro » Mon Jan 19, 2015 10:57 am

Gracias, creo que lo he encontrado
Code: Select all  Expand view


oCol:lCaseSenstive ( default .f. )

 


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

Desde Diciembre / 2009 :shock: :oops: :D
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
User avatar
cnavarro
 
Posts: 6501
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: XBrowse AutoSort Case Sensitive

Postby cnavarro » 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: Select all  Expand view

.../...
    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

Image
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
User avatar
cnavarro
 
Posts: 6501
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: XBrowse AutoSort Case Sensitive

Postby nageswaragunupudi » Mon Jan 19, 2015 1: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
User avatar
nageswaragunupudi
 
Posts: 10263
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: XBrowse AutoSort Case Sensitive

Postby cnavarro » Mon Jan 19, 2015 2: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
User avatar
cnavarro
 
Posts: 6501
Joined: Wed Feb 15, 2012 8:25 pm
Location: España


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 14 guests