[Vala] How to assign to construct-only property?



Hello,

I want to set "raw" property in Gsf.InputGZip.
Should I inherit Gsf.InputGZip ?

--------

void main (string[] args)
{
    Gsf.InfileMSOle olefile;

    string filename = args[1];

    try   {
        var file = new Gsf.InputStdio (filename);
        olefile  = new Gsf.InfileMSOle (file);
    }
    catch {
        stderr.printf ("%s is not a OLE file\n", filename);
        return;
    }

    var input = olefile.child_by_name("DocInfo");

    // HERE, How to assign to construct-only property?
    var stream = new Gsf.InputGZip(input);
}

--------


Reference:

http://www.valadoc.org/#!api=libgsf-1/Gsf.InputGZip
    public bool raw { construct set; get; }

http://projects.gnome.org/libgsf/gsf-Compression.html#gsf-input-gzip-new
    "raw"    gboolean    : Read / Write / Construct Only
    Whether to read compressed data with no header and no trailer.
    Default value: FALSE


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