mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-07 09:18:18 +02:00
fixed TDataModule.OnCreate
git-svn-id: trunk@4392 -
This commit is contained in:
parent
173fcfe148
commit
2d244346ef
@ -4509,14 +4509,15 @@ end;
|
|||||||
procedure TPropertyEditorHook.Modified(Sender: TObject);
|
procedure TPropertyEditorHook.Modified(Sender: TObject);
|
||||||
var
|
var
|
||||||
i: Integer;
|
i: Integer;
|
||||||
|
AForm: TCustomForm;
|
||||||
begin
|
begin
|
||||||
i:=GetHandlerCount(htModified);
|
i:=GetHandlerCount(htModified);
|
||||||
while GetNextHandlerIndex(htModified,i) do
|
while GetNextHandlerIndex(htModified,i) do
|
||||||
TPropHookModified(FHandlers[htModified][i])(Sender);
|
TPropHookModified(FHandlers[htModified][i])(Sender);
|
||||||
if FLookupRoot<>nil then begin
|
if FLookupRoot<>nil then begin
|
||||||
if (FLookupRoot is TCustomForm)
|
AForm:=GetDesignerForm(FLookupRoot);
|
||||||
and (TCustomForm(FLookupRoot).Designer<>nil) then
|
if (AForm<>nil) and (AForm.Designer<>nil) then
|
||||||
TCustomForm(FLookupRoot).Designer.Modified;
|
AForm.Designer.Modified;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
20
lcl/forms.pp
20
lcl/forms.pp
@ -802,6 +802,7 @@ type
|
|||||||
FOnCreate: TNotifyEvent;
|
FOnCreate: TNotifyEvent;
|
||||||
FOnDestroy: TNotifyEvent;
|
FOnDestroy: TNotifyEvent;
|
||||||
FOldCreateOrder: Boolean;
|
FOldCreateOrder: Boolean;
|
||||||
|
function OldCreateOrderIsStored: boolean;
|
||||||
procedure ReadHeight(Reader: TReader);
|
procedure ReadHeight(Reader: TReader);
|
||||||
procedure ReadHorizontalOffset(Reader: TReader);
|
procedure ReadHorizontalOffset(Reader: TReader);
|
||||||
procedure ReadVerticalOffset(Reader: TReader);
|
procedure ReadVerticalOffset(Reader: TReader);
|
||||||
@ -828,7 +829,8 @@ type
|
|||||||
published
|
published
|
||||||
property OnCreate: TNotifyEvent read FOnCreate write FOnCreate;
|
property OnCreate: TNotifyEvent read FOnCreate write FOnCreate;
|
||||||
property OnDestroy: TNotifyEvent read FOnDestroy write FOnDestroy;
|
property OnDestroy: TNotifyEvent read FOnDestroy write FOnDestroy;
|
||||||
property OldCreateOrder: Boolean read FOldCreateOrder write FOldCreateOrder;
|
property OldCreateOrder: Boolean read FOldCreateOrder write FOldCreateOrder
|
||||||
|
stored OldCreateOrderIsStored;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
const
|
const
|
||||||
@ -1037,9 +1039,6 @@ function InitResourceComponent(Instance: TComponent;
|
|||||||
MemStream.Position:=0;
|
MemStream.Position:=0;
|
||||||
//writeln('Form Stream "',ClassType.ClassName,'" Signature=',copy(CompResource.Value,1,4));
|
//writeln('Form Stream "',ClassType.ClassName,'" Signature=',copy(CompResource.Value,1,4));
|
||||||
try
|
try
|
||||||
if Instance.Name='' then begin
|
|
||||||
|
|
||||||
end;
|
|
||||||
Instance:=MemStream.ReadComponent(Instance);
|
Instance:=MemStream.ReadComponent(Instance);
|
||||||
except
|
except
|
||||||
on E: Exception do begin
|
on E: Exception do begin
|
||||||
@ -1061,12 +1060,12 @@ begin
|
|||||||
//GlobalNameSpace.BeginWrite; // hold lock across all ancestor loads (performance)
|
//GlobalNameSpace.BeginWrite; // hold lock across all ancestor loads (performance)
|
||||||
try
|
try
|
||||||
//LocalizedLoading:=(Instance.ComponentState * [csInline,csLoading])=[];
|
//LocalizedLoading:=(Instance.ComponentState * [csInline,csLoading])=[];
|
||||||
//if LocalizedLoading then BeginGloabelLoading; // push new loadlist onto stack
|
//if LocalizedLoading then BeginGlobalLoading; // push new loadlist onto stack
|
||||||
try
|
try
|
||||||
Result:=InitComponent(Instance.ClassType);
|
Result:=InitComponent(Instance.ClassType);
|
||||||
//if LocalizedLoading then NotifyGloablLoading; // call Loaded
|
//if LocalizedLoading then NotifyGlobalLoading; // call Loaded
|
||||||
finally
|
finally
|
||||||
//if LocalizedLoading then EndGloablLoading; // pop loadlist off stack
|
//if LocalizedLoading then EndGlobalLoading; // pop loadlist off stack
|
||||||
end;
|
end;
|
||||||
finally
|
finally
|
||||||
//GlobalNameSpace.EndWrite;
|
//GlobalNameSpace.EndWrite;
|
||||||
@ -1318,6 +1317,11 @@ begin
|
|||||||
FDesignSize.Y := Reader.ReadInteger;
|
FDesignSize.Y := Reader.ReadInteger;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TDataModule.OldCreateOrderIsStored: boolean;
|
||||||
|
begin
|
||||||
|
Result:=FOldCreateOrder;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TDataModule.WriteWidth(Writer: TWriter);
|
procedure TDataModule.WriteWidth(Writer: TWriter);
|
||||||
begin
|
begin
|
||||||
Writer.WriteInteger(FDesignSize.X);
|
Writer.WriteInteger(FDesignSize.X);
|
||||||
@ -1360,7 +1364,7 @@ initialization
|
|||||||
Screen:= TScreen.Create(nil);
|
Screen:= TScreen.Create(nil);
|
||||||
Application:= TApplication.Create(nil);
|
Application:= TApplication.Create(nil);
|
||||||
|
|
||||||
{$IFDEF VER1_0_8}
|
{$IFDEF UseFCLDataModule}
|
||||||
RegisterInitComponentHandler(TComponent,@InitResourceComponent);
|
RegisterInitComponentHandler(TComponent,@InitResourceComponent);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
// keep this comment, there is parser a bug in fpc 1.0.x
|
// keep this comment, there is parser a bug in fpc 1.0.x
|
||||||
|
Loading…
Reference in New Issue
Block a user