Re: [Vala] "Asynchronous Stream Reading" example does not work



On Sun, Sep 19, 2010 at 7:43 AM, JM <interflug1 gmx net> wrote:
It works for me on vala-0.10.0 . Did you try it with a textfile as arg?
Jörn


Hi,
I have MacOSX 10.6, vala 0.10, libgee 0.5.3, glib 2.25.17. I run
examples from this page http://live.gnome.org/Vala/GIOSamples and all
of them work fine except "Asynchronous Stream Reading" one.

I build it with "valac --pkg gio-2.0 example.vala" and then run as
./example I have following failure. I don't know what does it mean,
probably the example should be updated.



Error 01!
start...
(process:74938): GLib-GIO-CRITICAL **:
g_data_input_stream_read_line_async: assertion `G_IS_DATA_INPUT_STREAM
(stream)' failed

I was able to localize it. With following code I have "Operation not
supported" Error. I am not sure what exactly operation is not
supported....


public class AsyncReadLineTest {
        public static int main(string[] args) {
            File f = File.new_for_uri("http://www.gnome.org";);
            try {
                DataInputStream di_stream = new DataInputStream(f.read(null));
            } catch (GLib.Error e) {
                print("%s\n", e.message);
            }   
            return 0;
        }
}



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