lcl: use standard exception when we parent is needed but is not assigned

git-svn-id: trunk@18610 -
This commit is contained in:
paul 2009-02-09 07:17:55 +00:00
parent 746c583d65
commit 5d150ea462

View File

@ -6568,8 +6568,7 @@ begin
CreateParams(Params);
with Params do begin
if (WndParent = 0) and (Style and WS_CHILD <> 0) then
RaiseGDBException('TWinControl.CreateWnd: no parent '+Name+':'+ClassName);
Assert((parent <> nil) or (WndParent = 0), 'TODO: find parent if parent=nil and WndParent <> 0');
raise EInvalidOperation.CreateFmt('Control ''%s'' has no parent window', [Name]);
end;
//DebugLn(['TWinControl.CreateWnd ',DbgSName(WidgetSetClass),' ',DbgSName(Self)]);