[Vala] [Genie] GLib Command Parsing



Hey,

I'm new to Genie, trying to learn the language through some small projects. I've run into an issue that I'm not sure is a syntax error on my part or a compiler bug. I reduced the code to a very simple example:


[indent=4]

init
    var version = false
    options : array of OptionEntry = {
{"version", 0, OptionFlags.IN_MAIN, OptionArg.NONE, out version, "Show version info.", null},
    { null }
    }


It produces the following compiler (error) output:


valac --verbose --fatal-warnings --save-temps --enable-checking --pkg=gtk+-3.0 -d build -o testgtk src/testgtk/main.gs src/testgtk/main.gs:6.43-6.43: error: Expected array element, got array initializer list {"version", 0, OptionFlags.IN_MAIN, OptionArg.NONE, out version, "Show version info.", null},
                                          ^
Compilation failed: 1 error(s), 0 warning(s)
make: *** [testgtk] Error 1


All help would be very appreciated,

Chris




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