[Vala] GLib Command Line Parsing



Hi,
I am trying to use the command line parsing interface
from GLib in Vala but got some problems.

The first is that I just don't know how to create
an array of GLib.OptionEntry to be given to
GLib.OptionContext.add_main_entries(). Since
OptionEntry is a `struct' I can create them one by
one using `new OptionEntry{field=value, ...}' and
add them to an array, but maybe there is an easier
way of doing it?

The second point is that OptionEntry defines a
field called `flags_' in glib-2.0.vapi and C code
accessing to this `flags_' field is generated but
the C library defines only a `flags' field.

Thanks a lot for this very nice Vala project!

--
Émilien Tlapale



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]