Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Delphi 3 bug: Message Dialogs vs DDE

0 views
Skip to first unread message

Andre Cordeiro Romao Borges Brandao

unread,
Mar 2, 1999, 3:00:00 AM3/2/99
to
Hello

I'm having severe troubles with Delphi 3.
I will offer a registered version of my application to anyone of
you solving me with this problem.

Each time my application calls a message dialog (not only called
by me programatically but also by internal routines such as database
exceptions, etc) the DDE link I use stops receiving data.

The only solution I have is to intercept when the application
calls the messagedlg or messagebox functions and refresh the DDE link at
that time.

How can I do an onmessagedlg event? or an on messagebox event?

Have you any other possible solution?

Please help me and I will be more than happy to offer you a
registered version of the application when it is finished.

Best regards, Andre Brandao


Christo Crause

unread,
Mar 4, 1999, 3:00:00 AM3/4/99
to
In article <Pine.GSO.4.02A.99030...@camoes.rnl.ist.utl.pt>,
ac...@camoes.rnl.ist.utl.pt says...

> Each time my application calls a message dialog (not only called
>by me programatically but also by internal routines such as database
>exceptions, etc) the DDE link I use stops receiving data.
>
> The only solution I have is to intercept when the application
>calls the messagedlg or messagebox functions and refresh the DDE link at
>that time.
>
> How can I do an onmessagedlg event? or an on messagebox event?

I don't have a complete solution to your problem, but you can trap exceptions
not handled by a try..except block by assigning an exception handling routine
to the Application.OnException method. In the following procedure exceptions
are trapped and showed in a statusbar on the form. At least this will get rid
of the exception Messageboxes.


TForm1 = class(TForm)
private
procedure HandleException(Sender: TObject; E: Exception);


procedure TForm1.HandleException(Sender: TObject; E: Exception);
begin
StatusBar1.SimpleText := E.ClassName + ' ==> ' + E.Message;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
Application.OnException := HandleException;
end;


--
Christo Crause
Thermal Separations Research
University of Stellenbosch
South Africa


0 new messages