[Vala] Fwd: Re: GenericArray problem
- From: Daniel Espinosa <esodan gmail com>
- To: Vala-list <vala-list gnome org>
- Subject: [Vala] Fwd: Re: GenericArray problem
- Date: Sat, 17 Oct 2015 07:58:50 -0500
---------- Mensaje reenviado ----------
De: "Daniel Espinosa" <esodan gmail com>
Fecha: oct. 17, 2015 7:58 AM
Asunto: Re: [Vala] GenericArray problem
Para: "Andy Lees" <andrewl oz gmail com>
Cc:
In LibreSCL (www.librescl.org) I just declare an empty class derived from a
generic one, this makes to call
var a = new Intclass ();
Just works.
If you want a binding friendly class definition you should define your own
get/set methods returning the actual value type not a generic, as in:
https://github.com/powerwaremediacore/librescl/blob/master/librescl/tDA.vala
I plan to add iterator methods to collections, this will allow bindings to
use them on loops. Because we relay on Gee, its iterators are generic
making hard/impossible to use on GObject Introspection bindings.
El oct. 16, 2015 6:22 PM, "Andy Lees" <andrewl oz gmail com> escribió:
Hi,
If I declare a derived class of GenericArray, like so:
public class IntArray : GenericArray<int> {
public IntArray() {
}
}
I get a gcc error, like so:
/tmp/a.vala.AH856X.c: In function ‘int_array_new’:
/tmp/a.vala.AH856X.c:66:2: error: too few arguments to function
‘g_ptr_array_new_with_free_func’
self = (IntArray*) g_ptr_array_new_with_free_func ();
whereas with Array (for example) it just works.
Is there something I'm doing wrong, or is this a bug?
Using Vala 0.30.0
Regards,
Andrew Lees
_______________________________________________
vala-list mailing list
vala-list gnome org
https://mail.gnome.org/mailman/listinfo/vala-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]