t is referencing ::Keyno() to reposition the vertical scrollbar, could this be the cause?
Incremental seek and method KeyNo() are in no way related.
- Code: Select all Expand view
DbSeek( cPreSeek + Upper( c )
The parameter provided by XBrowse while evaluating the bSeek codeblock, is the buffer including the present key stroke. Adding this buffer to the previous buffer gives erroneous results. Instead just the DbSeek( c ) should be used.
While using special RDDs like SQLRDD, the following points need to be kept in mind:
XBrowse assumes that the RDD supports all the ord* functions and these functions provide reliable results. If for any reason, we suspect some functions may not work correctly, then only we need to build our own codeblocks or otherwise, we better leave the building of codeblocks to XBrowse.
1. oBrw:bKeyNo: The bKeyNo codeblock automatically generated by XBrowse depends on OrdKeyNo() and OrdKeyGoTo( n ) functions. If we feel that these functions are not properly supported by the RDD or if these functions provide the same results as RecNo() and DbGoTo() functions, we may set oBrw:bkeyNo := oBrw:bBookMark
2. oBrw:bSeek: If we specify AUTOSORT clause in command syntax or lAutoOrder ( 2nd parameter ) as .t. in SetRDD( cAlias, .t. ) method, XBrowse automatically creates the bSeek codeblock. This codeblock is quite advanced and works perfectly. But this codeblock depends on OrdKey(), OrdSetFocus() and DbSeek() functions. In case oBrw:lWildSeek is set to .t., this also uses OrdWildSeek() function.
If we suspect this codeblock may not be working properly with any particular RDD, we may try the following two simple variations:
oBrw:bSeek := { |c| ( oBrw:cAlias )->( DbSeek( c ) ) }
or
oBrw:bSeek := { |c| ( oBrw:cAlias )->( DbSeek( Upper( c ) ) ) }
as may be required.