On Mon, Oct 8, 2012 at 5:19 AM, Daniel Hughes <[email protected]> wrote: > Hi guys, > > I have done a blog post detailing the method I use for invoking on the UI > thread in widemargin in the hope that others might find it useful. You can > read it here: > > http://trampster.blogspot.co.nz/2012/10/invoking-on-ui-thread-in-gtk.html
Brilliant! I had also developed the same as keeping track of the thread and invoking when needed, but adding it as an Extension Method to the Gtk.Widget is a great idea. One question: in the initial call of RevokeRequired, won't the Application.Invoke get sent off to the GUI thread, and thus the return value will be wrong because the setting of _uiThread won't have completed yet? or am I mistaken? I guess you could have a special InitializeRevoke. BTW, We have found that the GUI thread is always the same (0 or 1, I forget). I wonder if that will always be the case? Thanks for sharing! -Doug > _______________________________________________ > Gtk-sharp-list maillist - [email protected] > http://lists.ximian.com/mailman/listinfo/gtk-sharp-list > _______________________________________________ Gtk-sharp-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
