RE: [gtkmm] Glib::IOChannel



> From: Christopher Clark [mailto:clark compudata-systems com] 
>    I've been working through the tutorial, and when I found that the 
> Monitoring I/O page was out of date, I wanted to try and get the demo 
> running anyway with a Glib::IOChannel.

I believe that it's up-to-date now. Please submit a bug if something in the
book is wrong, with a link to the book online, showing exactly which part
you mean.

>    This is what I think the logic should look like (called 
> from within 
> ExampleApp::ExampleApp):
> 
> Glib::RefPtr<Glib::IOChannel> ifile =
>    Glib::IOChannel::create_from_file("testfifo", "r");
> Glib::RefPtr<Glib::IOSource> isource = 
> ifile->create_watch(Glib::IO_IN);
> isource->connect(SigC::slot(*this, &ExampleApp::on_input_read));
> 
>    I removed the code to create the fifo from the program itself, and 
> created a working fifo ("cat" and "tail -f" check out), but 
> if I run the 
> program, on_input_read never gets called.
> 
>    I've tried it with the created watch responding to everything, and 
> it's not signalling an error, either.  Have I missed 
> something, or does 
> Glib::IOChannel just not work?

I don't personally use them, but I have heard that they work well. If you
don't get a response here then please do submit a bug with a test case.

Murray Cumming
murrayc usa net
www.murrayc.com 



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