lcl: undo rev 27074 #706b7cc905 and re implement using a static variable

git-svn-id: trunk@27081 -
This commit is contained in:
blikblum 2010-08-12 16:05:16 +00:00
parent aff125b5f7
commit 366d200bb8
6 changed files with 64 additions and 7 deletions

View File

@ -285,6 +285,7 @@ Type
procedure Loaded; override;
procedure Notification(AComponent: TComponent;
Operation: TOperation); override;
class procedure WSRegisterClass; override;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
@ -382,6 +383,7 @@ Type
protected
procedure DataChange(Sender: TObject); override;
procedure UpdateData(Sender: TObject); override;
class procedure WSRegisterClass; override;
public
// we need to overrride the write method for db aware.
// the Read isn't an issue since the list will be updated
@ -845,6 +847,7 @@ Type
procedure Change; override;
procedure KeyPress(var Key:Char); override;
procedure WndProc(var AMessage : TLMessage); override;
class procedure WSRegisterClass; override;
public
constructor Create(TheOwner: TComponent); override;
destructor Destroy; override;
@ -975,6 +978,7 @@ Type
procedure PictureChanged(Sender: TObject); override;
procedure LoadPicture; virtual;
procedure Loaded; override;
class procedure WSRegisterClass; override;
public
constructor Create(TheOwner: TComponent); override;
destructor Destroy; override;
@ -1691,10 +1695,6 @@ end;
initialization
RegisterPropertyToSkip(TDBImage, 'Picture', 'Removed in 0.9.29. DB control should not save/load their data from stream.', '');
RegisterPropertyToSkip(TDBListBox, 'Items', 'Removed in 0.9.29. DB control should not save/load their data from stream.', '');
RegisterPropertyToSkip(TDBMemo, 'Lines', 'Removed in 0.9.29. DB control should not save/load their data from stream.', '');
RegisterPropertyToSkip(TDBText, 'Caption', 'Removed in 0.9.29. DB control should not save/load their data from stream.', '');
{$I lcl_dbnav_images.lrs}
finalization

View File

@ -1481,6 +1481,8 @@ type
{ TStringGrid }
TStringGrid = class(TCustomStringGrid)
protected
class procedure WSRegisterClass; override;
public
property Modified;
published
@ -10980,9 +10982,20 @@ begin
FEditors[i].ActiveControl:=ActiveCtrl;
end;
initialization
RegisterPropertyToSkip(TStringGrid, 'VisibleRowCount',
{ TStringGrid }
class procedure TStringGrid.WSRegisterClass;
const
Done: Boolean = False;
begin
if Done then
Exit;
RegisterPropertyToSkip(Self, 'VisibleRowCount',
'Property streamed in by older compiler', '');
RegisterPropertyToSkip(TStringGrid, 'VisibleColCount',
RegisterPropertyToSkip(Self, 'VisibleColCount',
'Property streamed in by older compiler', '');
inherited WSRegisterClass;
Done := True;
end;
end.

View File

@ -193,6 +193,17 @@ begin
DataChange(Self);
end;
class procedure TDBImage.WSRegisterClass;
const
Done: Boolean = False;
begin
if Done then
Exit;
inherited WSRegisterClass;
RegisterPropertyToSkip(TDBImage, 'Picture', 'Removed in 0.9.29. DB control should not save/load their data from stream.', '');
Done := True;
end;
constructor TDBImage.Create(TheOwner: TComponent);
begin
inherited Create(TheOwner);

View File

@ -41,3 +41,14 @@ begin
FDataLink.Field.AsString := '';
end;
class procedure TDBListBox.WSRegisterClass;
const
Done: Boolean = False;
begin
if Done then
Exit;
inherited WSRegisterClass;
RegisterPropertyToSkip(TDBListBox, 'Items', 'Removed in 0.9.29. DB control should not save/load their data from stream.', '');
Done := True;
end;

View File

@ -215,6 +215,17 @@ begin
inherited WndProc(AMessage);
end;
class procedure TDBMemo.WSRegisterClass;
const
Done: Boolean = False;
begin
if Done then
Exit;
inherited WSRegisterClass;
RegisterPropertyToSkip(TDBMemo, 'Lines', 'Removed in 0.9.29. DB control should not save/load their data from stream.', '');
Done := True;
end;
destructor TDBMemo.Destroy;
begin
FDataLink.Free;

View File

@ -91,6 +91,17 @@ begin
end;
end;
class procedure TDBText.WSRegisterClass;
const
Done: Boolean = False;
begin
if Done then
Exit;
inherited WSRegisterClass;
RegisterPropertyToSkip(TDBText, 'Caption', 'Removed in 0.9.29. DB control should not save/load their data from stream.', '');
Done := True;
end;
{ Public Methods}
constructor TDBText.Create(AOwner: TComponent);
begin