Re: [Vala] Re : Release testing
- From: Jürg Billeter <j bitron ch>
- To: Thomas Chust <chust web de>
- Cc: vala-list gnome org
- Subject: Re: [Vala] Re : Release testing
- Date: Sun, 30 Nov 2008 23:47:45 +0100
On Sun, 2008-11-30 at 02:00 +0100, Thomas Chust wrote:
fdsdœ Fsfsd schrieb:
[...]
Code:
Gtk.ListStore model = (Gtk..ListStore) combobox.get_model();
GLib.Value content_type = Value(typeof(string));;
model.get_value(iter, 2, ref content_type);
Message at runtime:
GLib-GObject-WARNING **: gvalue.c:185: cannot initialize GValue with
type `gchararray', the value has already been initialized as `gchararray'
[...]
However, since the Gtk+ library apparently insists on initializing the
Value structure in this situation, the signature of
Gtk.TreeModel.get_value should really include an out parameter, not a
ref parameter...
Fixed in r1207.
Also the GLib.Value.unset method should really have a special annotation
so that the compiler knows a Value structure is uninitialized after a
call to that method -- on the other hand this hack wouldn't work then ;-)
You should never need to use Value.unset in Vala except when using raw
pointers.
Jürg
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]