Al usar el DBCombo me salia error de "Tipo de Dato" despues de hacer un "Incremental Search", por lo que tuve que modificar nuevamente el metodo KeyChar(..) de la clase; y quedo asi:
- Code: Select all Expand view RUN
METHOD KeyChar( nKey, nFlags) CLASS TDBCombo
local nNewAT := 0, nOldAT:=::nAT
// Incremental search
if nKey = 32 // space resets the search
::cSearchKey := ""
::Set( If( ValType( Eval( ::bSetGet ) ) == "N", 1, ::aItems[ 1 ] ) ) //<- RSU: Aqui el cambio!!!!
else
if nKey = VK_BACK
::cSearchKey := left(::cSearchKey,Len(::cSearchKey)-1)
else
::cSearchKey += upper(chr(nKey))
endif
nNewAT := ascan(::aList, {|x| upper(x) = ::cSearchKey} )
if nNewAt != nOldAt .and. nNewAT != 0 // If found and changed
if ::lSound
tone(60,.3) // sound if searchkey found
endif
::Set( If( ValType( Eval( ::bSetGet ) ) == "N", nNewAt, ::aItems[ nNewAt ] ) ) //<- RSU: Aqui el cambio!!!!
if ::bChange != nil
if ::oGet != nil // Always not nil for dropdown
::oGet:VarPut( Eval( ::bSetGet ) ) // udate variable before calling bChange
::oGet:Refresh()
endif
Eval( ::bChange, Self, ::varGet() )
endif
return 0 //<- RSU: Aqui el cambio!!!!
else
::cSearchKey := left(::cSearchKey,Len(::cSearchKey)-1)
endif
endif
Super:KeyChar(nKey, nFlags)
RETURN 0 // Must be 0 - We don't want API default behavior.
Espero les sirva ...
Saludos
Rolando Salazar
Sauro Srl.
Informática y Sistemas
Cochabamba - Bolivia
FWH 8.02 xharbour 1.1.0 (SimpLex)