[Vala] Help with struct array

Hello all

I'm beginning to learn Vala & Gtk. I've manage through Vala/Tutorial
upto the end of OOP chapter and couldn't handle the rest =)

Anywho I'm trying to port Webkit html5 based WYSIWYG editor[0] to
Vala. Sounds easy and fun.

I've hit a small problem. I'm failing to create a valid Array of ActionEntries.

public void add_actions (ActionEntry[] entries, void* user_data);

I'm my code I'm trying something like this:

    ActionEntry[] entries = new ActionEntry[3];
    entries =
            {name="menuFile", label="_File"},
            {name="menuEdit", label="_Edit"},
            {name="menuInsert", label="_Insert"};

    var actions = new ActionGroup("Actions");
    actions.add_entries(entries, 3);

And I'm getting an error saying that ";" is expected in the line where
I define entries for the first time.

Please help =)

Full code here [1].

[1] http://bazaar.launchpad.net/~dmitrij.ledkov/%2Bjunk/vala/annotate/head:/editkit.vala
With best regards

Dmitrijs Ledkovs (for short Dima),
Ледков Дмитрий Юрьевич

()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

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