[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

help with ncurses

Xavier Noria

9/30/2006 8:51:00 PM

I want to ask ncurses for the terminal size, or to clear the screen,
nothing more fancy than that. I have been playing around a bit
without luck, a bit blindly due to the lack of library docs. Can
anyone help?

-- fxn


2 Answers

David Vallner

9/30/2006 9:22:00 PM

0

Xavier Noria wrote:
> I want to ask ncurses for the terminal size, or to clear the screen,
> nothing more fancy than that. I have been playing around a bit without
> luck, a bit blindly due to the lack of library docs. Can anyone help?
>
> -- fxn
>
>

Lack of docs for -curses-?!

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

If you find out the author of a Ruby binding didn't go through
copy/pasting the underlying C library's documentation on his website for
convenience, just look that up, or go figure in irb. Besides, the
standard ruby curses binding works fine enough for that. Having never
before used Curses, irb tells me about Curses::init_screen,
Curses::lines, Curses::cols, and Curses::clear...

David Vallner

Xavier Noria

9/30/2006 9:56:00 PM

0

On Sep 30, 2006, at 11:21 PM, David Vallner wrote:

> Xavier Noria wrote:
>> I want to ask ncurses for the terminal size, or to clear the screen,
>> nothing more fancy than that. I have been playing around a bit
>> without
>> luck, a bit blindly due to the lack of library docs. Can anyone help?
>>
>> -- fxn
>>
>>
>
> Lack of docs for -curses-?!

Lack of ncurses-ruby docs.

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

Yeah, I already glanced over that document before asking for help.

> If you find out the author of a Ruby binding didn't go through
> copy/pasting the underlying C library's documentation on his
> website for
> convenience, just look that up, or go figure in irb.

Yes I did. The library docs says "This wrapper provides access to the
functions, macros, global variables and constants of the ncurses
library. These are mapped to a Ruby Module named "Ncurses": Functions
and external variables are implemented as singleton functions of the
Module Ncurses."

I played around with irb, with the output of Ncurses.methods.sort,
etc. without luck.

> Besides, the
> standard ruby curses binding works fine enough for that. Having never
> before used Curses, irb tells me about Curses::init_screen,
> Curses::lines, Curses::cols, and Curses::clear...

Ah, now that is Curses, a standard library I didn't remember
(different from ncurses). In that library what I need is
straigthforward to get.

-- fxn