libseed-list trying to read a gio stream



Here I come with more problems... Sorry. :)

I'm trying to read a file with Gio:

> gio = imports.gi.Gio
[object Object]

> f = gio.file_new_for_path("helloworld.js")
[object GLocalFile]
> x = f.read()
[object GLocalFileInputStream]
> x.read()

(seed:2637): GLib-GIO-CRITICAL **: g_input_stream_read: assertion `buffer != NULL' failed
0
> buf = {}
[object Object]
> x.read(buf)

(seed:2637): GLib-GIO-CRITICAL **: g_input_stream_read: assertion `buffer != NULL' failed
0
> buf = []

> x.read(buf)

(seed:2637): GLib-GIO-CRITICAL **: g_input_stream_read: assertion `buffer != NULL' failed
0
>

How does functions that take an output parameter map to javascript in seed? I thought they would return the output, or an object with a property for each output if there are several?

/Jonatan


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