[Vala] Problem with closure values reference count

2010-11-15 Thread Moritz Bitsch
Hi Everyone, I found some strange errors related to closures. The following code triggers it (tested with every vala version form 0.9.8 trough 0.11.2): unowned Thread t; void bugMe() { string text = "bug me"; t = Thread.create(() => { Thread.usleep((1000*1000) / 2);

Re: [Vala] Blitzen: A Vala Application Server

2010-11-15 Thread Samuel CUELLA
Hi, >My idea is to write a widget that extends GtkWebkit widget >and uses embeds a blitzen >query server only accessible for this webkit instance. >I dont want to use it via HTTP, >just want to hook the query signals of webkit to the >query handler methods of >blitzen. Blitzen works with GIOCha

Re: [Vala] Blitzen: A Vala Application Server

2010-11-15 Thread Samuel CUELLA
Hi, >I have noticed that widgets in Stk are using different reference counting rules >than Gtk. So you have to explicitly define the variables as class fields, else >all widgets gets destroyed. Vala compiler always generate a g_object_unref() call just after widget creation. That's why objects are

Re: [Vala] Blitzen: A Vala Application Server

2010-11-15 Thread Abderrahim KITOUNI
Hello, 2010/11/15 Samuel CUELLA : >>I have noticed that widgets in Stk are using different reference counting >>rules >>than Gtk. So you have to explicitly define the variables as class fields, else >>all widgets gets destroyed. > Vala compiler always generate a g_object_unref() call just after w

Re: [Vala] Problem with closure values reference count

2010-11-15 Thread Abderrahim KITOUNI
Hello, 2010/11/15 Moritz Bitsch : > Hi Everyone, > > I found some strange errors related to closures. > The following code triggers it (tested with every vala version form > 0.9.8 trough 0.11.2): >[...] > This short program prints "(null)" instead of "bug me". > It seems to me that closures don't

Re: [Vala] Regression?

2010-11-15 Thread Jürg Billeter
On Mon, 2010-11-15 at 00:33 +0100, pancake wrote: > This program compiles with no errors/warnings in vala-head and it should > report an error because of missing 'return' in function: Thanks for the report. This is now fixed in master. Jürg ___ vala-li