Ncurses howto examples available

Hi,

I looked for some example code of ruby with ncurses and didn't find any.
To learn a bit about it, I followed the documentation available at http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/index.html and transposed it some examples to ruby.

I put those files available at http://www.raphinou.com/rubyncurses-examples.tgz .

I'm now looking for examples of the use of some more advanced features of ncurses libraries like those listed at the end of the howto:

Panels: http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/panels.html
Menus: http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/menus.html
Forms: http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/forms.html
CDK: http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/tools.html#CDK

Does anyone know if those are usable with the ruby ncurses library? Any example out there?

Thanks.

Raph

Bauduin Raphael wrote:

I put those files available at http://www.raphinou.com/rubyncurses-examples.tgz .

Thanks for translating these. I'll have a look soon.

Panels: http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/panels.html
Menus: Menus Library
Forms: Forms Library
CDK: Tools and Widget Libraries

Does anyone know if those are usable with the ruby ncurses library? Any example out there?

Panel and form are supported. See the end of the README file in ncurses-ruby.

And maybe you have missed the "examples" directory of ncurses-ruby?

Tobias

Tobias Peters wrote:

Bauduin Raphael wrote:

I put those files available at http://www.raphinou.com/rubyncurses-examples.tgz .

Thanks for translating these. I'll have a look soon.

Panels: http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/panels.html
Menus: Menus Library
Forms: Forms Library
CDK: Tools and Widget Libraries

Does anyone know if those are usable with the ruby ncurses library? Any example out there?

Panel and form are supported. See the end of the README file in ncurses-ruby.

Ok, thanks. I missed that indeed, but it's quite normal as higher in the document there is:

"If you don't know how to use ncurses from C, then stop reading here, and read an introduction to ncurses."

and I followed this instruction :slight_smile:

Having read it now, I'm looking for the form2.rb example it mentions. (It doesn't seem to be included in the Debian package). Are there good examples available somewhere?

And maybe you have missed the "examples" directory of ncurses-ruby?

I saw these and they helped me starting, but they are limited in scope.

Thanks.

Raph

···

Tobias

Bauduin Raphael wrote:

Panel and form are supported. See the end of the README file in ncurses-ruby.

Ok, thanks. I missed that indeed, but it's quite normal as higher in the document there is:

"If you don't know how to use ncurses from C, then stop reading here, and read an introduction to ncurses."

and I followed this instruction :slight_smile:

Having read it now, I'm looking for the form2.rb example it mentions. (It doesn't seem to be included in the Debian package).

I see. Sorry about that. At one point, I became tired answering basic ncurses questions that were unrelated to the ruby binding. I should add that the reader should continue with the readme after acquiring basic ncurses knowledge.

> Are there good

examples available somewhere?

I think "raggle" uses ncurses. "aeditor" did so once, but I do not know if it does still.

Tobias

http://www.raphinou.com/rubyncurses-examples.tgz .

Thanks for translating these. I'll have a look soon.

I've looked at your examples and have the following suggestions:

example1.rb: mvaddstr would work (there was a typo)
example2.rb: use different arrays for row and col: row=;col=

Having read it now, I'm looking for the form2.rb example it mentions.
(It doesn't seem to be included in the Debian package).

Looks like a packaging oversight. You can get them from the source package in the meantime, or via ViewCVS: Adminpanel

Tobias

[snip]

"aeditor" did so once, but I do not know if it does still.

AEditor 0.x uses your ncurses lib.
AEditor 1.x uses fxruby.

AEditor 2.x uses my own wrapper for ncursesw, so I can deal with unicode.
See shot: http://aeditor.rubyforge.org/aeditor_shots/057.png

There exists 2 other editors that uses curses/ncurses:
ruvi. http://ruvi.rubyforge.org/
diakonos. http://purepistos.net/diakonos/

···

On Sun, 6 Feb 2005 23:55:11 +0900, Tobias Peters <tpeters@invalid.uni-oldenburg.de> wrote:

--
Simon Strandgaard