Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > How can I make an FXRuby window stay open for a set amount of time?

Reply
Thread Tools

How can I make an FXRuby window stay open for a set amount of time?

 
 
Paul
Guest
Posts: n/a
 
      03-05-2007
I wrote a simple FXRuby program that displays a message in a window on
the desktop. I would like to make this window go away after a set
amount of time (e.g. 30 minutes if left alone).

I'm new to scripting in Ruby, so I don't know how to do this. Can
anyone offer me any suggestions or pointers as to how I can implement
a configurable timer that will automatically shut down the window when
the time is up?

My program is similar to one of the 'hello' examples on the FXRuby
examples page:
http://www.fxruby.org/doc/examples.html

I've browsed through the Programming Ruby book but I didn't see any
default classes or methods that would help me do this.

 
Reply With Quote
 
 
 
 
Lyle Johnson
Guest
Posts: n/a
 
      03-05-2007
On 3/5/07, Paul <> wrote:

> I wrote a simple FXRuby program that displays a message in a window on
> the desktop. I would like to make this window go away after a set
> amount of time (e.g. 30 minutes if left alone).
>
> I'm new to scripting in Ruby, so I don't know how to do this. Can
> anyone offer me any suggestions or pointers as to how I can implement
> a configurable timer that will automatically shut down the window when
> the time is up?


Look at the documentation for the addTimeout() method:

http://www.fxruby.org/doc/api/classes/Fox/FXApp.html

Hope this helps,

Lyle

P.S. Please consider subscribing to the fxruby-users mailing list, and
posting FXRuby-related questions there instead of on ruby-talk. For
more information about the fxruby-users mailing list, see this page:

http://rubyforge.org/mailman/listinfo/fxruby-users

 
Reply With Quote
 
 
 
 
Paul
Guest
Posts: n/a
 
      03-05-2007
On Mar 5, 2:05 pm, "Lyle Johnson" wrote:
>
> Look at the documentation for the addTimeout() method:

[snip]
>
> P.S. Please consider subscribing to the fxruby-users mailing list, and
> posting FXRuby-related questions there instead of on ruby-talk. For
> more information about the fxruby-users mailing list, see this page:
>
> http://rubyforge.org/mailman/listinfo/fxruby-users


Thanks for the link and the mailing list reference, Lyle. I didn't
know about either of those.
That should really help.

Cheers! Paul. =)

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
[ANN] At InfoQ: Interview about FXRuby, plus an exclusive chapterfrom the FXRuby Book Lyle Johnson Ruby 0 05-20-2008 02:32 PM
make a browser window stay on top window handle? =?Utf-8?B?RHVzdGluIElJLg==?= ASP .Net 1 08-18-2004 06:26 AM
Make a function call itself after set amount of time Bart Nessux Python 5 01-16-2004 11:18 PM
RE: Make a function call itself after set amount of time Pieter Claerhout Python 0 01-13-2004 02:30 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57