lcl: don't raise EResNotFound in TCustomForm.Create if RaiseEResNotFoundInTCustomFormCreate = False

git-svn-id: trunk@29268 -
This commit is contained in:
paul 2011-01-31 10:16:55 +00:00
parent 950a89dbc3
commit 430382d436
2 changed files with 6 additions and 2 deletions

View File

@ -1637,6 +1637,7 @@ var
Screen: TScreen = nil;
ExceptionObject: TExceptObject;
HintWindowClass: THintWindowClass = THintWindow;
RaiseEResNotFoundInTCustomFormCreate: Boolean = True;
type
TMessageBoxFunction =

View File

@ -1880,8 +1880,11 @@ begin
Include(FFormState, fsCreating);
try
if not InitResourceComponent(Self, TForm) then
raise EResNotFound.CreateFmt(
rsFormResourceSNotFoundForResourcelessFormsCreateNew, [ClassName]);
if RaiseEResNotFoundInTCustomFormCreate then
raise EResNotFound.CreateFmt(
rsFormResourceSNotFoundForResourcelessFormsCreateNew, [ClassName])
else
DebugLn(Format(rsFormResourceSNotFoundForResourcelessFormsCreateNew, [ClassName]));
finally
Exclude(FFormState, fsCreating);
end;