Re: Trouble finding GIR constructor for Soup.Cookie

2011/7/17 Ricardo Gladwell <ricardo gladwell gmail com>
However, I'm getting problems trying to figure out the constructor for
the Soup.Cookie object. I've tried:

let cookie ="SID", "", "", "/", -1);
let cookie = Soup.Cookie.c_new("SID", "", "", "/", -1);
let cookie = new Soup.Cookie("SID", "", "", "/", -1);
let cookie = new Soup.Cookie();

Only the first and last snippets are valid syntax in Gjs; the last option is preferred, but cannot be used for Soup.Cookie (which is a boxed type with no constructor without parameters). So you'll have to use the first option.

But no combination seems to work.

Maybe you forgot to import the soup namespace?

Been using this site to give some
indicators as to what to use:

But I'm uncertain if these docs are correct.

No idea, the site appears to be down right now.


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