mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-07 01:06:02 +02:00
lcl: fix possible access violation by setting lookup after handle creation of lookup controls
git-svn-id: trunk@32918 -
This commit is contained in:
parent
21a7f6daf5
commit
c42f1fd451
@ -437,8 +437,8 @@ Type
|
||||
protected
|
||||
procedure DataChange(Sender: TObject); override;
|
||||
procedure DoSelectionChange(User: Boolean); override;
|
||||
procedure InitializeWnd; override;
|
||||
procedure KeyDown(var Key: Word; Shift: TShiftState); override;
|
||||
procedure Loaded; override;
|
||||
procedure UpdateData(Sender: TObject); override;
|
||||
public
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
@ -755,8 +755,8 @@ Type
|
||||
procedure SetNullValueKey(const AValue: TShortCut);
|
||||
procedure UpdateLookup;
|
||||
protected
|
||||
procedure InitializeWnd; override;
|
||||
procedure KeyDown(var Key: Word; Shift: TShiftState); override;
|
||||
procedure Loaded; override;
|
||||
procedure UpdateData(Sender: TObject); override;
|
||||
procedure DataChange(Sender: TObject); override;
|
||||
public
|
||||
|
@ -56,9 +56,9 @@ begin
|
||||
inherited KeyDown(Key, Shift);
|
||||
end;
|
||||
|
||||
procedure TDBLookupComboBox.Loaded;
|
||||
procedure TDBLookupComboBox.InitializeWnd;
|
||||
begin
|
||||
inherited Loaded;
|
||||
inherited InitializeWnd;
|
||||
if FDataLink.Active then
|
||||
UpdateLookup;
|
||||
end;
|
||||
|
@ -59,6 +59,13 @@ begin
|
||||
inherited DoSelectionChange(User);
|
||||
end;
|
||||
|
||||
procedure TDBLookupListBox.InitializeWnd;
|
||||
begin
|
||||
inherited InitializeWnd;
|
||||
if FDataLink.Active then
|
||||
UpdateLookup;
|
||||
end;
|
||||
|
||||
procedure TDBLookupListBox.KeyDown(var Key: Word; Shift: TShiftState);
|
||||
begin
|
||||
if FLookup.HandleNullKey(Key, Shift) then
|
||||
@ -71,13 +78,6 @@ begin
|
||||
inherited KeyDown(Key, Shift);
|
||||
end;
|
||||
|
||||
procedure TDBLookupListBox.Loaded;
|
||||
begin
|
||||
inherited Loaded;
|
||||
if FDataLink.Active then
|
||||
UpdateLookup;
|
||||
end;
|
||||
|
||||
function TDBLookupListBox.GetKeyField: string;
|
||||
begin
|
||||
Result := FLookup.KeyField;
|
||||
|
Loading…
Reference in New Issue
Block a user