[Vala] [SOLVED]Re: How to pass a gtk widget to a thread?



Sorry, there was problem in the use of the widget and not because passing
it to the thread.

It work great now

On 22 June 2013 14:55, Nadav Vinik <nadavvin gmail com> wrote:

Hello

I change the constructor of the following example:
https://live.gnome.org/Vala/ThreadingSamples

to get a gtk widget instead of string, but while it compile successfully,
if I use the widget inside the thread, it failed to compile and I have the
following error:
"/home/nadav3/gtk-foobar2/src/pcap-thread.c:241:4: error: cannot convert
to a pointer type"

public MyThread (ListStore l) {        this.l = l;    }

public void* thread_func () {
                l.append (out iter);
                l.set(iter, 0, "test");
}

var t=new MyThread(l);
unowned Thread<void*> a = Thread.create<void*> (t.thread_func, true);

thanks
Nadav

--
הבלוג שלי:
http://nadavvin.com




-- 
הבלוג שלי:
http://nadavvin.com


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]