Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Playing with $stdout...
Drew Shapiro
6/29/2007 1:02:00 AM
Hi,
I'm trying to create a library of functions for programs that use a
command line interface. One feature I'd like to implement is a
date_selector. What I'd like to have is the $stdout display todays date
with one field somehow highlighted. The user could then navigate and
adjust using the arrow keys untill the desired date is set and press
Enter. My problem is that I'm not sure how to rewrite something that's
already been printed to the standard output, if that's possible at all.
Does any of this make sense or am I crazy?
--
Posted via
http://www.ruby-...
.
1 Answer
Brett Simmers
6/29/2007 1:25:00 AM
0
You can probably accomplish that with the standard curses library:
http://ruby-doc.org/stdlib/libdoc/curses/rdoc/...
Or the ncurses-ruby library:
http://ncurses-ruby.b...
The "documentation" for the former is pretty much just a list of
functions. The second one seems to be a fairly direct mapping to the
ncurses C library, so you can use documentation for the C library. As
far as I know, ncurses is one of the most popular libraries for doing
manipulation of the console.
-Brett
Drew Shapiro wrote:
> Hi,
>
> I'm trying to create a library of functions for programs that use a
> command line interface. One feature I'd like to implement is a
> date_selector. What I'd like to have is the $stdout display todays date
> with one field somehow highlighted. The user could then navigate and
> adjust using the arrow keys untill the desired date is set and press
> Enter. My problem is that I'm not sure how to rewrite something that's
> already been printed to the standard output, if that's possible at all.
>
> Does any of this make sense or am I crazy?
>
>
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Playing with $stdout...
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password