FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour xBrowse - Búsqueda incremental - Agregado (No hace falta)
Posts: 593
Joined: Sat May 12, 2007 11:47 AM
xBrowse - Búsqueda incremental - Agregado (No hace falta)
Posted: Sat Sep 07, 2013 11:12 PM
Buenas noches,

No encontré otra forma de hacerlo así que agregué una reforma al "METHOD Seek( cSeek ) CLASS TXBrowse" con la finalidad que al hacer una búsqueda incremental en campos que están escritos todo en mayúscula. Si el teclado no está en mayúsculas, con esta reforma también realiza la búsqueda incremental.

Code (fw): Select all Collapse
METHOD Seek( cSeek ) CLASS TXBrowse
.....

if ::lIncrFilter
      if ValType( cSeek ) == 'C'
         uBook    := ::BookMark
//      if Eval( ::bSeek, cSeek, @uSeek )
         if Eval( ::bSeek, cSeek, @uSeek ) .and. Eval( ::bSeek, upper(cSeek), @uSeek )  // by rolo
                                                                          // para buscar por letras
                                                                          // minúsculas
...

If cSeek == nil
      if ! Empty( ::cSeek )
         ::cSeek := ""
         If ::oSeek != nil
            ::oSeek:SetText( "" )
         Endif
      endif
      return lRet
Endif

   uBook := ::BookMark

//  if !Eval( ::bSeek, cSeek )
     if !Eval( ::bSeek, cSeek ) .AND. !Eval( ::bSeek, upper(cSeek) )        // by rolo
                                                            // para buscar por letras
                                                            // minúsculas
      ::BookMark  := uBook
      MsgBeep()
      return lRet
   endif

...


Saludos.

Rolando :-)
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xBrowse - Búsqueda incremental - Agregado
Posted: Sun Sep 08, 2013 05:43 PM
No encontré otra forma de hacerlo así que agregué una reforma al "METHOD Seek( cSeek ) CLASS TXBrowse" con la finalidad que al hacer una búsqueda incremental en campos que están escritos todo en mayúscula. Si el teclado no está en mayúsculas, con esta reforma también realiza la búsqueda incremental.

Not necessary.
XBrowse's built-in bSeek takes care of this. This is a part of built-in bSeek
Code (fw): Select all Collapse
         lFound   := DbSeek( Upper( cExpr ) ) .or. DbSeek( cExpr )
Regards



G. N. Rao.

Hyderabad, India
Posts: 593
Joined: Sat May 12, 2007 11:47 AM
Re: xBrowse - Búsqueda incremental - Agregado
Posted: Sun Sep 08, 2013 09:06 PM

Good afternoon,

Yes, you are absolutely right.

Still do not understand why, but in my program had this fault.

Today I went to compile everything again and to my surprise, my program works fine without "my added".

I apologize for the inconvenience.

Thank you.

Rolando :D

P.D. Sorry for my English, I helped with the translator of Google.

Continue the discussion