[Lazarus] I can't exit this component

Arí Ricardo Ody nightrider43 at gmail.com
Fri Mar 29 12:09:12 CET 2024


In the method below, after running TSaveDialog I cannot proceed. Anywhere I
click always reopens TSaveDialog. The OnClose event is executed. I know
because I placed a ShowMessage on this event.
====================================================
procedure TfrmGeraString.tedtNomArqMicEnter(Sender: TObject);
var auxstr : TFileName;
begin
  if rbTransMainframe.checked then
     if opdArqmicro.Execute then
        tedtNomArqMic.Text := opdArqmicro.FileName
     else
  else
     begin;
       auxstr := tsdArqString.InitialDir;
       tsdArqString.Title := 'Informe nome que será gravado no micro';
       tsdArqString.DefaultExt := '';
       tsdArqString.FileName := '';
       if tsdArqString.Execute then
          tedtNomArqMic.Text := tsdArqString.FileName
       else;
       tsdArqString.InitialDir := auxstr;
     end;
  btnAvanca.SetFocus;
end;
============
Regardless of whether I click Save or Cancel, when I click on the next
component of the form, the TSaveDialog is always triggered again.
The only TSaveDialog event that has an associated action is OnClose, which
executes a ShowMessage and closes.
Can someone explain to me where I'm going wrong,
please?========================================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20240329/e28e10d8/attachment.htm>


More information about the lazarus mailing list