[Gtk-sharp-list] Application.Invoke and threads: strangebehavior

amartinez at atc.ugr.es amartinez at atc.ugr.es
Wed Oct 19 07:20:18 EDT 2005


> The problem is that the value of "tmp" is shared (captured) and as soon
> as you queue the delegate, tmp will be reloaded with the next value from
> ReadLine.

Thanks Miguel,

Now I have tried to use a little C program (attached) which uses printf
and sleep(1). The usage is 'foo 4' and prints 4 strings, one every second.

The situation is just the same, I can't understand why the command ping
works fine and my foo program not. The standard out and the TextView are
refreshed at the end of the execution of foo.

I've tried "\n", "\r", "\n\r" ... without success...

I've attached the 2 sources:

$ gcc foo.c -o foo
$ gmcs -pkg:gtk-sharp-2.0 test.cs
$ mono test.exe

What's wrong at this time?

Regards,

--
Antonio Martínez Alvarez
http://atc.ugr.es/~amartinez
-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.c
Type: text/x-csrc
Size: 333 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20051019/1e34bbff/foo.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.cs
Type: text/x-csharp
Size: 1846 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20051019/1e34bbff/test.bin


More information about the Gtk-sharp-list mailing list