[Vala] How to pass a gtk widget to a thread?
- From: Nadav Vinik <nadavvin gmail com>
- To: vala-list gnome org
- Subject: [Vala] How to pass a gtk widget to a thread?
- Date: Sat, 22 Jun 2013 14:55:23 +0300
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]