Using DBF.
When define a codeblock for skip, xbrowse update fail.
Code: Select all | Expand
@ 70, 10 XBROWSE xControl ;
DATASOURCE Alias() ;
SIZE nDlgWidth - 24, nDlgHeight - 100 PIXEL ;
OF xDlg ;
ON DBLCLICK ( (nRow), (nCol), (nFlags), FWBrowseENTER( xDlg, xControl ) )
WITH OBJECT xControl
:SetRdd()
:bGoTop := { || ( nSelect )->( FazBrowseTop() ) }
:bGoBottom := { || ( nSelect )->( FazBrowseBottom() ) }
:bSkip := { | n | ( nSelect )->( FazBrowseSkip( n ) ) }
//:bBof := { || Bof() }
//:bEof := { || Eof() }
//:bBookMark := { | n | iif( n == nil, RecNo(), DbGoto( n ) ) }
ENDWITH
...
STATIC FUNCTION FazBrowseSkip( nSkip )
LOCAL nSkipped := 0
IF Empty( nSkip )
RETURN 0
ENDIF
IF nSkip > 0
DO WHILE nSkipped < nSkip
SKIP
IF Eof()
SKIP -1
EXIT
ENDIF
nSkipped++
ENDDO
ELSE
DO WHILE nSkipped > nSkip
SKIP -1
IF Bof()
SKIP
EXIT
ENDIF
nSkipped--
ENDDO
ENDIF
RETURN nSkipped