Re: reading a serial port, putting it in a EntryBox



On Mon, Aug 30, 2010 at 10:44 AM, Wolfman <wolfhack yahoo com> wrote:
At this moment, I'm want to do an application capable to read permanently from /dev/ttyS0 and the output 
put into an entry box

I can read from /dev/ttyS0 but I dont know how can I read continously from it and put the result in a entry 
Box

The Gtk2-Perl FAQ has a question along these lines [1].

You use the add_watch method to watch a filehandle for changes, then
your anonymous subroutine gets called whenever some data appears on
that filehandle.  It would be up to you to have that anonymous
subroutine parse the data and make any changes to controls on your
form.

I would start with the example listed in the FAQ, and search for
"Gtk2::Helper" or the actual class Gtk2::Helper calls, "Glib::IO",  in
the mailing list archives to find more examples of similar problems.

Thanks,

Brian

[1] 
http://live.gnome.org/GTK2-Perl/FrequentlyAskedQuestions#How_do_I_keep_my_GUI_updating_while_doing_a_long_file_read.3F



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