ncurses howto examples available

Discussion in 'Ruby' started by Bauduin Raphael, Feb 5, 2005.

  1. 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, Feb 5, 2005
    #1
    1. Advertising

  2. 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: 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?


    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, Feb 6, 2005
    #2
    1. Advertising

  3. 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: 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?

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

    >
    > Tobias
     
    Bauduin Raphael, Feb 6, 2005
    #3
  4. 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 :)
    >
    > 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
     
    Tobias Peters, Feb 6, 2005
    #4
  5. Simon Strandgaard, Feb 6, 2005
    #5
  6. >>> 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:
    http://cvs.berlios.de/cgi-bin/viewcvs.cgi/ncurses-ruby/ncurses-ruby/examples/

    Tobias
     
    Tobias Peters, Feb 6, 2005
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Paul Woodward

    Linux Console Applications / NCurses

    Paul Woodward, Jul 22, 2003, in forum: C++
    Replies:
    0
    Views:
    429
    Paul Woodward
    Jul 22, 2003
  2. Paul Woodward

    Linux Console Applications / NCurses

    Paul Woodward, Jul 22, 2003, in forum: C++
    Replies:
    0
    Views:
    503
    Paul Woodward
    Jul 22, 2003
  3. Paul Woodward

    Console Application / NCurses

    Paul Woodward, Jul 22, 2003, in forum: C++
    Replies:
    0
    Views:
    392
    Paul Woodward
    Jul 22, 2003
  4. dmitrey
    Replies:
    8
    Views:
    472
    Paul Rubin
    May 23, 2007
  5. Kenneth McDonald
    Replies:
    1
    Views:
    152
    Nit Khair
    Sep 27, 2008
Loading...

Share This Page