Subject Re: [IBO] Delphi hang up at Close all
Author Russell Belding
Hello Guido

(off the topic of IBO)

In a (D6, MDI, IBO, IB/FB, Report Buider) project I have in development I
also use CloseAll and see no problem. But I do a "closeall" under my
control.

I have seen an error like the one you describe, found the cause and repaired
it. You will have to assess if the following description applies to your
case. IBO had nothing to do with my cause or solution.

In a (D6, BDE, MDI, Report Builder) application, I had an error which
behaved like the one you have described. The problem I had was that my forms
required special actions when closing and the Delphi CloseAll knew nothing
of my requirement so I had to take control of the CloseAll sequence.

Here is my solution, which may or may not trigger a thought for you.

procedure TMainForm.CloseAll1Click(Sender: TObject);
var
I : integer;
begin
for I := MDIChildCount - 1 downto 0 do
begin
if assigned(MDIChildren[I]) then
begin
if MDIChildren[I].InheritsFrom(TavForm) then
begin
try
(MDIChildren[I] as TavForm).Close;
except
{ do something ...};
end;{try}
Application.ProcessMessages;
end{inherits from }
else
begin
with MDIChildren[I] do Close;
end;{does not inherit from ...}
end;{MDIChildren[I] is assigned}
end;{for I}
end;{CloseAll..}

Best regards

Russell


<guido.klapperich@...> wrote in message
news:3C3D4394.BEA3BA77@......
> I have several projects with IBO-components and when I prepare or open
> an query in a project at designtime and then choose 'close all' in the
> delphi menu, delphi hangs up every time. Is this a known problem and
> exists a workaround for this ?
>
>
> Guido