Cosmetic in project files:

* Move const.inc and compilers.inc back to main source directory
* Move remaining few lines of code from heidicomp.pas to helpers.pas
* Remove components/compilerdetection and components/heidisql
* Remove remainders of EDBImage component, unused since Aug 08.
This commit is contained in:
Ansgar Becker
2009-10-19 22:13:04 +00:00
parent a9dd16766b
commit aaa02877a2
31 changed files with 189 additions and 363 deletions

View File

@ -103,6 +103,23 @@ type
// General purpose editing status flag
TEditingStatus = (esUntouched, esModified, esDeleted, esAddedUntouched, esAddedModified, esAddedDeleted);
TDeferDataSet = class;
TAsyncPostRunner = procedure(ds: TDeferDataSet) of object;
TDeferDataSet = class(TZQuery)
private
callback: TAsyncPostRunner;
kind: Integer;
protected
procedure InternalPost; override;
procedure InternalRefresh; override;
public
constructor Create(AOwner: TComponent; PostCallback: TAsyncPostRunner); reintroduce;
procedure ExecSQL; override;
procedure DoAsync;
procedure DoAsyncExecSql;
end;
{$I const.inc}
function implodestr(seperator: WideString; a: TWideStringList) :WideString;
@ -3083,6 +3100,48 @@ begin
end;
procedure TDeferDataSet.InternalPost;
begin
kind := 1;
if @callback = nil then DoAsync
else callback(self);
end;
procedure TDeferDataSet.InternalRefresh;
begin
kind := 3;
if @callback = nil then DoAsync
else callback(self);
end;
procedure TDeferDataSet.ExecSql;
begin
kind := 2;
if @callback = nil then DoAsync
else callback(self);
end;
constructor TDeferDataSet.Create(AOwner: TComponent; PostCallback: TAsyncPostRunner);
begin
callback := PostCallback;
inherited Create(AOwner);
end;
procedure TDeferDataSet.DoAsync;
begin
case kind of
1: inherited InternalPost;
2: inherited ExecSQL;
3: inherited InternalRefresh;
end;
end;
procedure TDeferDataSet.DoAsyncExecSql;
begin
inherited ExecSql;
end;
end.