LCL: always registering ResourceHandler

git-svn-id: trunk@10580 -
This commit is contained in:
mattias 2007-02-05 10:15:50 +00:00
parent 31a49fa7d8
commit 8c958b060d
2 changed files with 15 additions and 18 deletions

View File

@ -1280,9 +1280,6 @@ function IsAccel(VK: word; const Str: string): Boolean;
procedure NotifyApplicationUserInput(Msg: Cardinal);
function InitResourceComponent(Instance: TComponent;
RootAncestor: TClass):Boolean;
function GetShortHint(const Hint: string): string;
function GetLongHint(const Hint: string): string;
@ -1458,12 +1455,6 @@ end;
//==============================================================================
function InitResourceComponent(Instance: TComponent;
RootAncestor: TClass):Boolean;
begin
Result:=InitLazResourceComponent(Instance,RootAncestor);
end;
function FindRootDesigner(AComponent: TComponent): TIDesigner;
var
Form: TCustomForm;
@ -1778,9 +1769,6 @@ initialization
Screen:=TScreen.Create(nil);
Application:=TApplication.Create(nil);
{$IFDEF UseFCLDataModule}
RegisterInitComponentHandler(TComponent,@InitResourceComponent);
{$ENDIF}
finalization
//DebugLn('forms.pp - finalization section');
LCLProc.OwnerFormDesignerModifiedProc:=nil;

View File

@ -262,6 +262,8 @@ var
LRSObjectReaderClass: TLRSObjectReaderClass=TLRSObjectReader;
LRSObjectWriterClass: TLRSObjectWriterClass=TLRSObjectWriter;
function InitResourceComponent(Instance: TComponent;
RootAncestor: TClass):Boolean;
function InitLazResourceComponent(Instance: TComponent;
RootAncestor: TClass): Boolean;
function CreateLRSReader(s: TStream; var DestroyDriver: boolean): TReader;
@ -498,6 +500,12 @@ begin
end;
end;
function InitResourceComponent(Instance: TComponent;
RootAncestor: TClass):Boolean;
begin
Result:=InitLazResourceComponent(Instance,RootAncestor);
end;
procedure DefineRectProperty(Filer: TFiler; const Name: string; ARect,
DefaultRect: PRect);
var
@ -4009,12 +4017,6 @@ begin
end;
//------------------------------------------------------------------------------
procedure InternalInit;
begin
LazarusResources:=TLResourceList.Create;
end;
{ TLRPositionLinks }
function TLRPositionLinks.GetLFM(Index: integer): Int64;
@ -4332,6 +4334,13 @@ begin
end;
end;
//------------------------------------------------------------------------------
procedure InternalInit;
begin
LazarusResources:=TLResourceList.Create;
RegisterInitComponentHandler(TComponent,@InitResourceComponent);
end;
initialization
InternalInit;