William Garrison wrote:
> Wouldn't using a regular delegate eliminate this issue?  It would copy 
> msg onto the stack for the call so the value wouldn't be overwritten 
> during the next loop.  (I'm not sure if this code is quite right, but 
> you get the idea)
> 
> while (Messages.Count > 0) {
>     msg = (Message) Messages.Dequeue();
>     send(msg);
>     Gtk.Application.Invoke(AppendAValue,msg);
>     Thread.Sleep(0);
> }
> 
> private void AppendAValue(Message msg)
> {
>     treeStore.AppendAvlues(msg.To, msg.Text);
> }

I realise you've done this example off the top of your head but do you 
know of any working examples?

As far as I can see I have to do something like:

    Gtk.Application.Invoke(this, msg, AppendAValue);

but it won't compile because msg isn't the right type (EventArgs).

Unfortunately the example in the Mono docs 
(http://www.go-mono.com/docs/[EMAIL PROTECTED]) 
doesn't actually show how to do this...
_______________________________________________
Gtk-sharp-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list

Reply via email to