Re: [Vala] Inspecting class hierarchy

2016-03-21 Thread Gergely Polonkai
Hello, for the first sight your format looks verybsimilar to key-value files already supported by GLib: https://developer.gnome.org/glib/stable/glib-Key-value-file-parser.html http://valadoc.org/#!api=glib-2.0/GLib.KeyFile Are you sure it won't work for your problem? If it would, you may want to

Re: [Vala] Inspecting class hierarchy

2016-03-21 Thread Gergely Polonkai
t; >> Type WeaponType = Type.from_name("Weapon"); >> Object weapon = Object.new(WeaponType, damage: 10); >> >> GLib.message("weapon.damage = %u", (weapon as Weapon).damage); >> >> return 0; >> } >> >> >>

Re: [Vala] request to add another example to Projects/Vala/ListExample

2016-06-22 Thread Gergely Polonkai
Hello, this is a pretty old topic, but I have the rights to edit wgo pages. If you think it is actually relevant, I can add this example to the wiki. Best, Gergely Gergely Polonkai [image: https://]about.me/gergely.polonkai <https://about.me/gergely.polonkai?promo=email_sig&utm

Re: [Vala] ORM For Vala?

2016-07-21 Thread Gergely Polonkai
You may want to check GOM, too: https://github.com/GNOME/gom On Jul 21, 2016 16:40, "Dev_NIX" wrote: > I think there is almanna > > https://github.com/AmbitionFramework/almanna > > -- > > * EOF * > > 2016-07-21 16:37 GMT+02:00 Adam Tauno Williams : > > > I generally develop in Python using t

Re: [Vala] ORM For Vala?

2016-07-22 Thread Gergely Polonkai
Other than mine that I've just started porting to GOM, no I don't, sorry. It worths a try to compose a nice query string on GitHub maybe (language:vala GOM or something similar) Best, Gergely On Jul 22, 2016 13:21, "Adam Tauno Williams" wrote: > On Thu, 2016-07-21

Re: [Vala] Array as big as an enum

2016-08-30 Thread Gergely Polonkai
That is actually the best approach if you have holes in your enum (which may bring in other problems) On Tue, Aug 30, 2016, 18:11 Evan Nemerson wrote: > On Mon, 2016-08-29 at 23:47 +0200, rastersoft wrote: > > Sorry, I found how to do that: > > > > int[] blah = new int[LAST_ELEMENT]; > > If you

Re: [Vala] LADSPA bindings

2016-09-11 Thread Gergely Polonkai
Should not that be (Descriptor instance, ulong port, double? dataLocation) instead? Using asterisk in Vala seems unnatural to me… On Sun, Sep 11, 2016, 18:09 Victor Aurélio Santos < victoraur.san...@gmail.com> wrote: > What I've tried: > > [CCode (copy_function="", destroy_function="")] >

Re: [Vala] LADSPA bindings

2016-09-11 Thread Gergely Polonkai
char[,] PortNames, but it may be I just haven’t seen such Vala construct before. On Sun, Sep 11, 2016, 18:37 Victor Aurélio Santos < victoraur.san...@gmail.com> wrote: > Don't know.. but the error stays even changing > > Em 11 de set de 2016 13:30, "Gergely Polonkai"

Re: [Vala] LADSPA bindings

2016-09-13 Thread Gergely Polonkai
I think you are missing prefixes: [CCode (lower_case_cprefix="", …)] Victor Aurélio Santos ezt írta (időpont: 2016. szept. 13., K, 4:23): > What I've done: > > [Compact, CCode (cname = "void")] > public class Handle { > // ... > } > > [CCode (has_target = false)] > public

[Vala] Using libgnomekbdui from Vala

2016-09-14 Thread Gergely Polonkai
Hello, I’d like to use libgnomekbdui from my Vala project, so I can display the current keyboard layout, but I ran into several problems. If I specify --pkg=Gkbd-3.0 (this is the GIR name, no VAPI is available), libkbdui doesn’t get linked, so my GtkTemplate can’t create the GkbdKeyboardDrawing w

[Vala] Writing binding for non-GLib library using FILE *

2017-04-05 Thread Gergely Polonkai
Hello, I’m trying to create a binding for libjwt, and one of its functions use FILE * pointer to save a JWT token to a file. Reading [2] makes me think I can use FileStream here, but vala complains: libjwt.vapi:77.28-77.37: error: The type name `FileStream' could not be found As I don’t need tha

Re: [Vala] Writing binding for non-GLib library using FILE *

2017-04-05 Thread Gergely Polonkai
That I totally forgot, thanks! It is working now. Al Thomas ezt írta (időpont: 2017. ápr. 5., Sze, 17:28): > > From: Gergely Polonkai > > Sent: Wednesday, 5 April 2017, 16:20 > > Subject: [Vala] Writing binding for non-GLib library using FILE * > > > I’m trying to

[Vala] Compact class with an unusual (in GLib terms) constructor

2017-04-05 Thread Gergely Polonkai
Hello, libjwt[1] has a strange constructor in GLib terms: int jwt_new(jwt_t **jwt); It returns 0 on success (like many C functions) or any valid errno on failure. I made the following binding for now: [CCode (cname = "jwt_new")] public static int create(out JWT jwt); Is there a better way to d

Re: [Vala] Gnome Gitlab

2017-12-27 Thread Gergely Polonkai
…which has much less visibility, as the whole GNOME ecosystem started to move to GitLab only recently. I’d vote for an active mirror on GitHub that redirects users to the GNOME GitLab instance. /Gergely On Wed, Dec 27, 2017, 19:02 Steven Oliver wrote: > Dr. Lauer, > While I might ordinarily ag