On 12/18/06, White Spirit <[EMAIL PROTECTED]> wrote:
> I recently did something very similar.  I used a separate thread to
> receive messages and then called Application.Invoke so that the thread
> could safely place the received text in a TextView buffer.

There's a list of GTK# multithreading techniques at
http://mono-project.com/Responsive_Applications

My favourite is Gtk.Application.Invoke (delegate { /*anonymous
delegate code*/ }; )
No matter which thread you run this from, the code in the anonymous
delegate will run in the GTK# thread, so it can safely run GUI code.
The anonymous delegate can also capture variables from its surrounding
scope, though with the usual caveats of cross-threading.

-- 
Michael Hutchinson
http://mjhutchinson.com
_______________________________________________
Gtk-sharp-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list

Reply via email to