[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Ruby Tk: how to make something happen periodically?

S P Arif Sahari Wibowo

2/10/2007 7:26:00 AM

Hi!

In Ruby Tk, how to make something happen periodically, while the user
does not touch the button, menu, etc.?

Thanks!

5 Answers

Morton Goldberg

2/10/2007 7:52:00 AM

0

On Feb 10, 2007, at 2:30 AM, S P Arif Sahari Wibowo wrote:

> In Ruby Tk, how to make something happen periodically, while the user
> does not touch the button, menu, etc.?

Go to <http://rubykitchensi... and search on "tktimer".

Regards, Morton



Morton Goldberg

2/10/2007 8:22:00 AM

0

On Feb 10, 2007, at 2:51 AM, Morton Goldberg wrote:

> On Feb 10, 2007, at 2:30 AM, S P Arif Sahari Wibowo wrote:
>
>> In Ruby Tk, how to make something happen periodically, while the user
>> does not touch the button, menu, etc.?
>
> Go to <http://rubykitchensi... and search on "tktimer".

Let me recant on that. It's better to go to Google and search "ruby
+tktimer". This finds a lot more stuff. I also recommend the
following link

http://www.ruby-lang.org/cgi-bin/cvsweb.cgi/ruby/ext/...

There you will find links to tktimer.rb, tktimer2.rb, and tktimer3.rb
-- these are examples of the use of the TkTimer class. It's also
possible that you might find

http://raa.ruby-lang.org/project/...

and

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-t...

useful.

Regards, Morton



S P Arif Sahari Wibowo

2/17/2007 11:19:00 PM

0

On Feb 10, 3:22 am, Morton Goldberg <m_goldb...@ameritech.net> wrote:
> > Go to <http://rubykitchensi... and search on "tktimer".
>
> Let me recant on that. It's better to go to Google and search "ruby
> +tktimer". This finds a lot more stuff. I also recommend the
> following link
> http://www.ruby-lang.org/cgi-bin/cvsweb.cgi/ruby/ext/...

Works like a charm, once I know the keyword, things went smoothly.
Thanks!

That said, do you know about proc in the arguments for TkTimer's start
method / parameter, where its result goes?

Thanks!

Morton Goldberg

2/18/2007 1:30:00 AM

0

On Feb 17, 2007, at 6:20 PM, S P Arif Sahari Wibowo wrote:

> On Feb 10, 3:22 am, Morton Goldberg <m_goldb...@ameritech.net> wrote:
>>> Go to <http://rubykitchensi... and search on "tktimer".
>>
>> Let me recant on that. It's better to go to Google and search "ruby
>> +tktimer". This finds a lot more stuff. I also recommend the
>> following link
>> http://www.ruby-lang.org/cgi-bin/cvsweb.cgi/ruby/ext/...
>
> Works like a charm, once I know the keyword, things went smoothly.
> Thanks!
>
> That said, do you know about proc in the arguments for TkTimer's start
> method / parameter, where its result goes?

No, I'm sorry, but I don't know where the result of a block passed to
TkTimer#start goes. In my own work, I have always written these
blocks for their effects, not their results. IMO you shouldn't rely
on the results such blocks. Remember: "effect" can include
modifications to the state of objects visible within your own code.

Regards, Morton

Hidetoshi NAGAI

2/18/2007 3:50:00 AM

0