ncurses howto examples available

  • Thread starter Bauduin Raphael
  • Start date
B

Bauduin Raphael

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
 
T

Tobias Peters

Bauduin said:

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

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
 
B

Bauduin Raphael

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



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 :)

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
 
T

Tobias Peters

Bauduin said:
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 :)

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
 
T

Tobias Peters

http://www.raphinou.com/rubyncurses-examples.tgz .
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:
http://cvs.berlios.de/cgi-bin/viewcvs.cgi/ncurses-ruby/ncurses-ruby/examples/

Tobias
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,007
Latest member
obedient dusk

Latest Threads

Top