Hmmm, not very great but thanks Felipe, what version you use?<br>I have tried with 0.9.28/FPC 2.2.4 and last svn/FPC 2.2.5 same.<br><br>I tried like you and this strange behavior when there is an event.<div id="result_box" dir="ltr">
I found a workaround, I hope this does not too unstable with the LCL</div> <br><br><br><div class="gmail_quote">2009/10/7 Felipe Monteiro de Carvalho <span dir="ltr"><<a href="mailto:felipemonteiro.carvalho@gmail.com">felipemonteiro.carvalho@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">It works if you don't update the caption but rather write the string<br>
to a field or to the console. So one can assume that you cannot update<br>
the LCL from this callback, for whatever reason.<br>
<br>
You can build a list of updates to be done and fill it and then unfill<br>
it with a timer.<br>
<br>
This code worked for me:<br>
<br>
TForm1 = class(TForm)<br>
Label1: TLabel;<br>
Timer1: TTimer;<br>
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);<br>
procedure FormCreate(Sender: TObject);<br>
procedure Timer1Timer(Sender: TObject);<br>
private<br>
{ private declarations }<br>
DccMan: TDccMan;<br>
StatusStr: string;<br>
procedure Change(Sender: TObject);<br>
public<br>
{ public declarations }<br>
end;<br>
<br>
.............<br>
<br>
procedure TForm1.Timer1Timer(Sender: TObject);<br>
begin<br>
Label1.Caption := StatusStr;<br>
end;<br>
<div class="im"><br>
procedure TForm1.Change(Sender: TObject);<br>
begin<br>
</div> StatusStr := DccMan.StatusStr;<br>
end;<br>
<br>
<br>
--<br>
Felipe Monteiro de Carvalho<br>
<font color="#888888"><br>
--<br>
_______________________________________________<br>
Lazarus mailing list<br>
<a href="mailto:Lazarus@lists.lazarus.freepascal.org">Lazarus@lists.lazarus.freepascal.org</a><br>
<a href="http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus" target="_blank">http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Laurent.<br><br>