Mattias,

Sorry, but I think you do not understand what I am trying to say: The bug to
be 'squashed' is not in my own application, but in Lazarus (LCL). If you
look into the files 'messagedialogs.inc' and 'dialogs.pp', you can see that
the mbClose button is defined there. But in the rest of the code there is no
mention of mbClose.
I think this is the function that causes it (in the first place):

Function ModalEscapeValue(Buttons : TMsgDlgButtons) : TModalResult;
begin
 If mbCancel in Buttons then
   Result := mrCancel
 else
   If mbAbort in Buttons then
     Result := mrAbort
 else
   If mbNo in Buttons then
     Result := mrNo
 else
   If mbIgnore in Buttons then
     Result := mrIgnore
 else
   If mbNoToAll in Buttons then
     Result := mrNoToAll
 else
   If mbYes in Buttons then
     Result := mrYes
 else
   If mbOk in Buttons then
     Result := mrOk
 else
   If mbRetry in Buttons then
     Result := mrRetry
 else
   If mbAll in Buttons then
     Result := mrAll
 else
   If mbYesToAll in Buttons then
     Result := mrYesToAll;
end;

This gives no result for mbClose, as far as I can see. But I suspect there are more functions affected. And since I think it is not very wise for me, as an amateur, to go and make changes in Lazarus'sources, I though I would post it in the forum. But, after all, it is no big deal, there are lots of other buttons to use besides mbClose.

Ad

----- Original Message ----- From: "Mattias Gaertner" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Monday, August 28, 2006 11:41 AM
Subject: Re: [lazarus] a possible (small) bug? [win32]


On Mon, 28 Aug 2006 01:53:55 +0200
"Ad Rienks" <[EMAIL PROTECTED]> wrote:

Mattias,

I am not sure what you mean by 'backtrace'. Maybe the callstack? I
send it as an attachment.

Thanks.

I think the bug was an uninitialized value. Please test.

Mattias



Best regards, Ad

----- Original Message ----- From: "Mattias Gaertner" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Monday, August 28, 2006 12:17 AM
Subject: Re: [lazarus] a possible (small) bug? [win32]


> On Sun, 27 Aug 2006 22:15:06 +0200
> "Ad Rienks" <[EMAIL PROTECTED]> wrote:
>
>> Hello,
>>
>> In an application I have the following line:
>>     MessageDlg(IntToStr(InputEdit.GetTextLen), mtInformation,
>> [mbClose], 0)
>>
>> running the program I get the Error: Project raised exception class
>> 'External: SIGSEGV'., jumping to the file messagedialogs.inc:
>> line125  CancelValue := ButtonResults[ModalEscapeValue (Buttons)];
>
> Can you create a backtrace?

--------------------------------------------------------------------------------
Mijn Postvak In wordt beschermd door SPAMfighter
564 spam-mails zijn er tot op heden geblokkeerd.
Download de gratis SPAMfighter vandaag nog!

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.0.405 / Virus Database: 268.11.6/428 - Release Date: 25-8-2006





--------------------------------------------------------------------------------
Mijn Postvak In wordt beschermd door SPAMfighter
566 spam-mails zijn er tot op heden geblokkeerd.
Download de gratis SPAMfighter vandaag nog!
_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to