Reading from an InputStream
- From: Michael Fletcher <m fletcher theplanet ca>
- To: javascript-list gnome org
- Subject: Reading from an InputStream
- Date: Sat, 28 Jan 2012 09:17:14 -0700
Hi
I am attempting to read from an InputStream. I had thought I would be
able to use a ByteArray but this did not seem to work.
> this.buf = new ByteArray.ByteArray(BUF_SIZE)
> is.read_async(this.buf, this.buf.length, 0, null, ptr(this,
this.read_ready), null)
It fails with
> Exception was: Error: Argument 'buffer' (type void) may not be null
Presumably this is because gjs does not know how to map a void* pointer.
How would I go about mapping something to a void* pointer. I managed to
build and install glib and gobject-introspection.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]