nageswaragunupudi wrote:Thanks for pointing out.
Instead of your modification, please try modifying "return nil" as "return nDown" at the end of Method GoDown().
This is implemented in the next release.
i didn't trust to change the return value , there can be elsewhere also a test on this value
I noticed also that 'nNext' isn't processed
I made a substitution for this method :
- Code: Select all Expand view
STATIC FUNC BrwEval(bBlock, bFor, bWhile, nNext, nRec, lRest ) //CLASS TXBrowse method eval has errors !!!!!
local Self := HB_QSelf()
local lFromTop := bWhile == nil .and. nNext == nil .and. nRec == nil .and. Empty( lRest )
local nSaveSelect := nil
local uBookMark
local nRow := 0
//# ifdef FRANKDEMONT
local MemRecno , nCount := 1 , bNext
//# endif
DEFAULT bBlock := { || nil }, bFor := { || .t. }, bWhile := { || .t. }, ;
nRec := 0, lRest := .t.
IF nNext == nil
bNext := {||.T.}
ELSEIF ValType(nNext) == "N"
IF nNext < 1
bNext := {||.F.}
ELSE
bNext := {||nCount <= nNext}
END
END
if ::nDataType == DATATYPE_RDD .and. ! Empty( ::cAlias )
nSaveSelect := SELECT()
SELECT( ::cAlias )
endif
uBookMark := Eval( ::bBookMark )
if lFromTop
::GoTop()
endif
if nRec > 0
::KeyNo( nRec )
Eval( bBlock, Self )
else
do while nRow++ <= ::nLen .and. Eval( bWhile, Self ) .AND. EVAL(bNext)
if Eval( bFor, Self )
Eval( bBlock, Self )
endif
MemRecno := EVAL(::bKeyNo)
::GoDown()
IF MemRecno == EVAL(::bKeyNo)
exit
END
nCount++
enddo
endif
MemRecno := EVAL(::bKeyNo)
Eval( ::bBookMark, uBookMark )
if ! Empty( nSaveSelect )
Select( nSaveSelect )
endif
::Refresh()
return MemRecNo
*/
Frank