Forum: Ruby-Gnome 2 Timer event with callback

5e6528016612181aa146fc31b130a05c?d=identicon&s=25 Andru M. (andru_m)
on 2013-11-11 01:24
Greetings,
There is an excellent Timer in Tk, called TkRtTimer. The functionality
is elegant: It has a callback after an elapsed amount of time.

http://www.ruby-doc.org/stdlib-2.0.0/libdoc/tk/rdo...

When I try and include 'tk' in a visual ruby project I get into big
trouble.
Does anyone have suggestions about how to get TKRTTimer to work in
visual ruby?
If the task is herculean or unlikely what are the possible solutions?
Most grateful for any help.
5e6528016612181aa146fc31b130a05c?d=identicon&s=25 Andru M. (andru_m)
on 2013-11-11 02:30
Experimenting with EventMachine timers. This would appear to need to run
as a new thread in parallel with the GUI.
5e6528016612181aa146fc31b130a05c?d=identicon&s=25 Andru M. (andru_m)
on 2013-11-11 04:51
Sorry to bother, using Rufus-Scheduler
Seems to work nicely.
B078cb4f4fb473c7a54d1fc36d10c70e?d=identicon&s=25 Regis d'Aubarede (raubarede)
on 2013-11-11 11:23
Andru M. wrote in post #1126902:
> Greetings,
> There is an excellent Timer in Tk, called TkRtTimer. The functionality
> is elegant: It has a callback after an elapsed amount of time.
>
there  is :
GLib::Timeout.add(n) {  block }

which do the job.  Doc :
    http://ruby-gnome2.sourceforge.jp/hiki.cgi?GLib::Timeout
and
    https://developer.gnome.org/glib/2.37/glib-The-Mai...
Ad99e25aa2b714d1017fa2c755aa7a7f?d=identicon&s=25 andru mccracken (andru)
on 2013-12-12 11:10
Thanks Regis!
This topic is locked and can not be replied to.