[Vala] Static array initialization



Hi again,

I run into problems when trying to initialize a static array.

using Gtk;

public class Test
{
        static Gtk.ActionEntry[] entries = {
                { "FileMenu", null, "_File", null, null, null },
                { "EditMenu", null, "_Edit", null, null, null }
        };
        
        static int main (string[] args) {

        }
}

I'm not even sure if this is the correct syntax, but then, Vala doesn't
complain. The generated C code however is clearly wrong and results in a
crash once you try to access the array.

Any comments on that?

Regards,

Dominique



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