[Gtk-sharp-list] Gtk# threading problem?
Vladimir Vukicevic
vladimir@pobox.com
09 Oct 2002 23:15:10 -0700
On Wed, 2002-10-09 at 20:09, Pablo Baena wrote:
> Should this work? Because it doesn't.
>
> Thank you!!!
> Pablo
>
> namespace test
> {
[snip]
> public void show_status()
> {
> TextBuffer buff = textview.Buffer;
> Console.WriteLine("showing: "+output);
> buff.InsertAtCursor(output+'\n', -1);
[snip]
This looks like the general unref problem that still exists.. don't
create/get the TextBuffer object each time, instead put TextBuffer buff
in your class and either assign it once at app start, or with a if (buff
== null) buff = textview.Buffer; here.
Other than that, the usage of ThreadNotify looks correct..
- Vlad
--
Vladimir Vukicevic <vladimir@pobox.com>