Help with ncurses

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

Xavier N. 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-talk/82359

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 V.

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

Lack of docs for -curses-?!
Lack of ncurses-ruby docs.

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

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs