Antonio/Daniel/Rao,
I'd like to recommend :SetFilter() be changed from:
to
This will allow the saving and restoring of filter condition and usable in the form of
Current code would throw an RTE if no pre-existing filter was set because cOld := ""
What do you guys think?
I'd like to recommend :SetFilter() be changed from:
METHOD SetFilter( cFilter ) CLASS TDataBase
  ( ::nArea )->( DbSetFilter( Compile( cFilter ), cFilter ) )
return nilto
METHOD SetFilter( cFilter ) CLASS TDataBase
  if empty(cFilter)
   (::nArea)->(dbClearFilter())
  endif
  ( ::nArea )->( DbSetFilter( Compile( cFilter ), cFilter ) )
return nilThis will allow the saving and restoring of filter condition and usable in the form of
 oDbf := TDatabase():new()
 cOld := (oDbf:nArea)->(dbfilter())
 oDbf:setFilter("SomeCondition()")
 oDbf:skip()
 oDbf:setFilter(cOld)Current code would throw an RTE if no pre-existing filter was set because cOld := ""
What do you guys think?
FWH 11.08/FWH 19.12
BCC5.82/BCC7.3
xHarbour/Harbour
BCC5.82/BCC7.3
xHarbour/Harbour