DC_FindBrowse

This forum is for eXpress++ general support.
Post Reply
Message
Author
MIGUELON
Posts: 135
Joined: Wed Feb 10, 2010 10:55 am

DC_FindBrowse

#1 Post by MIGUELON »

Hello Roger, when you use the DC_FindBrowse and I have enabled "lAutoSeek =. t.."
You could improve the search, if you type a character that there will not let me keep writing.

Regards
Miguel

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: DC_FindBrowse

#2 Post by rdonnay »

I do not understand your question.
The eXpress train is coming - and it has more cars.

MIGUELON
Posts: 135
Joined: Wed Feb 10, 2010 10:55 am

Re: DC_FindBrowse

#3 Post by MIGUELON »

Try to explain better.
When I search for a string with dc_findBrowse eg "JOE" and the more value proximity table is "JOAQUIN", I wish that I only can type "JO"

Regards
Miguel

Intentare explicarme mejor.
Cuando busco una cadena de caracteres con dc_findBrowse por ejemplo "JOE" y en la tabla el valor mas proximio es "JOAQUIN", desearia que solo me permita solo escribir "JO"

Saludos
Miguel

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: DC_FindBrowse

#4 Post by rdonnay »

DC_FindBrowse() is something that I regret ever writing because it doesn't always suit everyone.

I suggest that you look at DC_BrowseAutoSeek() and create your own find browse.
You can pass it a code block for how you want to handle the seek.

When seeking a database, DC_BrowseAutoSeek() and DC_FindBrowse() both do a soft-seek via dbSeek().
This usually satisfies most user requirements. You could write your own algorithm for seeking if you need something more advanced.
The eXpress train is coming - and it has more cars.

MIGUELON
Posts: 135
Joined: Wed Feb 10, 2010 10:55 am

Re: DC_FindBrowse

#5 Post by MIGUELON »

Thanks for your reply Roger, I try not to modify the original code because every time a new update of eXpress + + I have to adapt to all the changes I've made.
I think it is more optimal dc_findborwse not allow me to keep looking for a fact that does not exist, so take your advice and will adapt its code.

Thank you very much
Miguel

User avatar
RDalzell
Posts: 205
Joined: Thu Jan 28, 2010 6:57 am
Location: Alsip, Illinois USA

Re: DC_FindBrowse

#6 Post by RDalzell »

PSST-0004.jpg
PSST-0004.jpg (99.83 KiB) Viewed 10206 times
Miguel,

Attached is an example of a routine which I use, perhaps you will find it helpful.

Rick
Attachments
Mvp605.zip
(78.85 KiB) Downloaded 622 times

MIGUELON
Posts: 135
Joined: Wed Feb 10, 2010 10:55 am

Re: DC_FindBrowse

#7 Post by MIGUELON »

Thank you very much for your help Rich, always learn the "code" of a partner. :)

Regards
Miguel

MIGUELON
Posts: 135
Joined: Wed Feb 10, 2010 10:55 am

Re: DC_FindBrowse

#8 Post by MIGUELON »

For if another user wants the search with dc_findbrowse smarter, I send the changes I made ​​in _dcfindx.prg. :)


IF Eval(bSeek,IIF( Valtype(cBuffer)="C",cPrefix + cBuffer,cBuffer))
IF (cAlias)->(DC_Eof())
(cAlias)->(DC_DbGoBottom())
ENDIF
nRecNo := (cAlias)->(RecNo())
IF oBrowse:isDerivedFrom("XbpBrowse")
oBrowse:refreshAll()
IF nRecNo # (cAlias)->(RecNo())
(cAlias)->(dbGoto(nRecNo))
oBrowse:refreshAll()
ENDIF
ELSEIF oBrowse:isDerivedFrom("XbpQuickBrowse")
oBrowse:gotoRecord((cAlias)->(RecNo()))
ENDIF
ELSE
//SIlex
PostAppEvent(xbeP_Keyboard,xbeK_BS,,oGet)
Break
ENDIF


Regards
Miguel

Post Reply