Re: [Vala] static const arrays
- From: "Phil Housley" <undeconstructed gmail com>
- To: "Sam Liddicott" <sam liddicott com>
- Cc: vala-list gnome org
- Subject: Re: [Vala] static const arrays
- Date: Mon, 23 Jun 2008 16:57:13 +0100
2008/6/23 Sam Liddicott <sam liddicott com>:
Vala hates the array initialization in the second block.
How should such a thing be done; please?
(I have searched and read examples and tutorials)
protected struct window_widget_names {
int index;
char* name;
char* class;
}
protected window_widget_names widget_info[] = {
{0, "GtkWindow", "win"},
{1, "GtkVBox", "vbox1"},
{2, "GtkMenuBar", "menubar1"},
{3, "GtkMenuItem", "menuitem-1"},
{3, "GtkMenuItem", "menuitem_1"},
{0,NULL,NULL}
}
What exactly happens? I use the following which works:
private const GLib.OptionEntry[] options = {
{ "database", 'd', 0, GLib.OptionArg.FILENAME, ref
database_filename, "Use the SQLite database in FILE", "FILE" },
{ null }
};
NULL isn't defined in Vala normally, so that's probably a problem with
your code - but then you might define it somewhere... Please send some
error messages if you can't find the problem.
--
Phil Housley
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]