[Gtk-sharp-list] A first go at gtk-sharp
Joop PG4I
Joop PG4I <joop.pg4i@gmail.com>
Sat, 26 Mar 2005 21:51:30 +0100
On Sat, 26 Mar 2005 12:49:04 -0800, Brad Taylor <brad@getcoded.net> wrote:
> The sleep command gives the buffer enough time to update text and
> doesn't pound gtk. The way that I overcame the problem was to lock the
> buffer on that first statement so that multiple instances of ready ()
> couldn't update the buffer at the same time like so:
>
> private void ready ()
> {
> TextMark EndMark;
>
> lock (b) {
> b.Insert (b.EndIter, data);
> }
>
> b.Insert (b.EndIter, "\r\n");
> EndMark = b.CreateMark ("end", b.EndIter, false);
> tv.ScrollToMark (EndMark, 0.4, true, 0.0, 1.0);
> b.DeleteMark (EndMark);
> }
>
Thanks Brad,
Just tried this. Left out the Thread.Sleep and added Lock. I get the
same results, when received strings are longer than a few lines, I
only see part of them. Putting the Sleep back in fixes it.
>
> -Brad
>
> --
> Brad Taylor
> Genome Software LLC
> http://www.getcoded.net
>
>
>
Regards,
Joop
--
Linux for your hamradio desktop
______________________________
http://www.qsl.net/pg4i/linux