Version 2.1  Apr-20-1997
(C) 1997 Christoph R. Kirchner


Description:

  TSelfRefreshTable and TSelfRefreshQuery are datasets that use 
  BDE-Callbacks to refresh themselves if the dataset got modified 
  by another program or by another dataset-component in the same 
  application.

  They use different methods for Delphi 1 and 2, but the source
  is the same for both versions.

  Delphi 1: (Query on) Paradox-tables only.
  Delphi 2: Paradox- and dBase-tables, others not tested yet.

  The Application.OnIdle-event is used to do the refresh if it is 
  save.


Disclaimer:

  Users of this component must accept this disclaimer of warranty:
    "This unit is supplied as is. The author disclaims all warranties,
    expressed or implied, including, without limitation, the warranties
    of merchantability and of fitness for any purpose.
    The author assumes no liability for damages, direct or
    consequential, which may result from the use of this component."

  This component is donated to the public as public domain.

  This component can be freely used and distributed in commercial and
  private environments.

  The source code may be freely distributed and used. The author
  accepts no responsibility for its use or misuse.

  If you do find this component handy and you feel guilty for using
  such a great product without paying someone - sorry :)

  Please forward any comments or suggestions to Christoph Kirchner at:
  ckirchner@geocities.com


Contents of Refresh.zip:

  Refreshr.pas  
    Contains TRefresher, needed for TSelfRefreshXXX
  Refresh.pas   
    TSelfRefreshTable (should be named RefreshT.pas, but I want to keep
    it compatible to previous versions)  
  RefreshQ.pas
    TSelfRefreshQuery
  RfrshReg.pas
    Contains the Register-procedure
  refresh.d16
    16-Bit refresh.dcr (image for the component palette)
  refresh.d32
    32-Bit refresh.dcr
  tstrefr*.*
    Sample project
  Readme.txt


Installation:

  To add this component to the component palette do:

  - From Delphi IDE Options Menu select Install Components
  - Add RfrshReg.pas


Notes:

  I did not want to write an TApplication-decendant. But I need some
  application-events. So I save the current application-events:
    FAppOnActivate := Application.OnActivate;
    FAppOnDeactivate := Application.OnDeactivate;
    FAppOnIdle := Application.OnIdle;
  Then I install my application-events ...
    Application.OnActivate := AppOnActivate;
    Application.OnDeactivate := AppOnDeactivate;
    Application.OnIdle := AppOnIdle;
  ... to call the old ones too if assigned:
  procedure TRefresher.AppOnIdle(Sender: TObject; var Done: Boolean);
  begin
    if Assigned(FAppOnIdle) then
      FAppOnIdle(Sender, Done);
    ...
  end;
  If you set Application.OnIdle to your procedure, please do it 
  this way too.
  Otherwise, if you do it after one TSelfRefreshXXX was opened,
  TSelfRefreshXXX will never refresh.

  Set DontRefreshIfAppDeactivated in the unit Refreshr.pas to true 
  if your program gets confused by self-refreshing datasets while 
  the application is not active.

  Use SetRefreshCheckPeriod(500), if you want to recognize changes
  done by other programs immediately.
  Use SetRefreshCheckPeriod(>1000) to save processor-time. You can 
  call ForceTableRefreshNow when needed to force a refresh for all 
  datasets.

  TSelfRefreshXXX should work in network-environments too.
  But it is only tested on Win95 with Novell 3.11, BDE ver. 3.5.

  Please Note that TSelfRefreshQuerys cannot get refreshed 
  if RequestLive is false.

  Be careful with TSelfRefreshQuery - it is not tested enough yet!
  Please report your experience with it.

  But if I get bug-reports - updates possible.


P.S.:

  You can find my collection of components at
  the Delphi Component Building Site,
  http://www.geocities.com/SiliconValley/Heights/7874/delphi.htm

  Maybe you can find an update of this component there.
  Also, there are components that are currently under construction -
  if one of them is useful for you:
  You can help me beta-testing it ... :)

