Suggestion of small change on xbrowse

Post Reply
JoséQuintas
Posts: 64
Joined: Tue Feb 09, 2021 4:20 pm

Suggestion of small change on xbrowse

Post by JoséQuintas »

Near to line 2190

Code: Select all | Expand

METHOD Skip( n ) CLASS TXBrowse

   local nStart
   local nSkipped := 0

   if !::lClosed
      TRY
         hb_Default( @n, 1 )
         if Empty( ::aFilter )
            nSkipped := Eval( ::bSkip, n, Self )
         else
            nStart      := ::nFltRow
            ::GoFltRow( ::nFltRow + n )
            nSkipped    := ::nFltRow - nStart
         endif
      CATCH
         ::nLen      := 0
         ::lClosed   := .t.
      END
   endif

return nSkipped
A default 1 for skip.
SKIP and SKIP 1 has same result (not sure if Nil is for this situation).
This eliminates the need to test Nil on user codeblock.
Please check if there exists any RDD/Class where Nil could be valid to codeblock.
José M. C. Quintas Brazil
gtwvg, fivewin 25.01, hwgui, mingw 15.0 rc (32 bits)
Post Reply