Hot to parse .ini file in extension
- From: Stefano Ciancio <s ciancio gmail com>
- To: gnome-shell-list gnome org
- Subject: Hot to parse .ini file in extension
- Date: Thu, 15 Dec 2011 11:30:06 +0100
Hi all,
I am developing a little extension for Gnome Shell and I need to read
and parse an .ini file from my system.
I find a GLib object (GKeyFile) that would be suitable for this, but I
cannot find doc, code, example on how to use it in shell.
With the code below:
const GLib = imports.gi.GLib;
let kf = new GLib.KeyFile();
I obtain the following error:
JS ERROR: !!! Exception was: Error: Unable to construct boxed
type KeyFile since it has no zero-args <constructor>, can only wrap an
existing one
JS ERROR: !!! lineNumber = '0'
JS ERROR: !!! fileName = '"gjs_throw"'
JS ERROR: !!! stack = '"("Unable to construct boxed type
KeyFile since it has no zero-args <constructor>, can only wrap an
existing one")@gjs_throw:0 test js:12"'
JS ERROR: !!! message = '"Unable to construct boxed type
KeyFile since it has no zero-args <constructor>, can only wrap an
existing one"'
Error: Unable to construct boxed type KeyFile since it has no zero-args
<constructor>, can only wrap an existing one
Can you help me?
Thanks,
Stefano C.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]