The Accidental Rubyist

invalid byte sequence in UTF-8

rbcurse-extras 0.0.0 released

with 9 comments

Finally managed to release rbcurse-extras initial version with a small tweak to vimsplit. I also did some work on Actions for widgets so using ":" or "M-:" could pop up a menu for the current widget. Applications can add to this. This led to upgrades in rbcurse-core, so i’ve released rbcurse-core-0.0.3 with those changes.

I’ve tested out only editable lists and tables (the old programs) in rbcurse-extras, not everything.

The previous version of rbcurse (0.0.2), allows the user to see key-bindings for the current widget/control by pressing "M-?" or "?". It allows user to edit a textbox in vim or EDITOR and also "save as" using the ":"/"M-:" menu. It also introduced History to Field (optional at present), so you need to extend the Field object. History can be popped up using "M-h". I’ve used this in the shell-output dialog.

I’ve done some changes to ncurses settings (cbreak and half-delay) as i found that pressing C-c repeatedly quickly was crashing the app (see earlier posts), Hope this holds up in all cases.

About these ads

Written by totalrecall

January 5, 2012 at 1:35 pm

Posted in ncurses, rbcurse, ruby

9 Responses

Subscribe to comments with RSS.

  1. Hi –
    a bunch of stuff in rbcurse-core is still broken – last updated about 7 months ago. Are you still working on it actively?

    Thanks!
    Florian

    Florian Leibert

    August 3, 2012 at 5:27 am

  2. Can you tell me what\’s broken. To my knowledge, it was all working. Thx.

    There may be some changes, in case you are expecting backward compatibility.

    totalrecall

    August 3, 2012 at 10:36 am

  3. just found your blog, and I’ve read it all through – its incredible

    Please dont stop writting it, its wonderfull :)

    Hope to have some time to test rbcurse-core

    zipizap

    November 19, 2012 at 5:58 am

  4. This is what I am getting:
    /usr/lib64/ruby/gems/1.9.1/gems/rbcurse-core-0.0.3/lib/rbcurse/core/system/panel.rb:5:in `’: Panel is not a class (TypeError)
    from /usr/lib64/ruby/gems/1.9.1/gems/rbcurse-core-0.0.3/lib/rbcurse/core/system/panel.rb:2:in `’
    from /usr/lib64/ruby/1.9.1/rubygems/custom_require.rb:36:in `require’
    from /usr/lib64/ruby/1.9.1/rubygems/custom_require.rb:36:in `require’
    from /usr/lib64/ruby/gems/1.9.1/gems/rbcurse-core-0.0.3/lib/rbcurse/core/system/window.rb:18:in `’
    from /usr/lib64/ruby/1.9.1/rubygems/custom_require.rb:36:in `require’
    from /usr/lib64/ruby/1.9.1/rubygems/custom_require.rb:36:in `require’
    from /usr/lib64/ruby/gems/1.9.1/gems/rbcurse-core-0.0.3/lib/rbcurse.rb:3:in `’
    from /usr/lib64/ruby/1.9.1/rubygems/custom_require.rb:60:in `require’
    from /usr/lib64/ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require’
    from /usr/lib64/ruby/1.9.1/rubygems/custom_require.rb:35:in `require’
    from main.rb:4:in `’
    ##### CODE
    require ‘rubygems’
    require ‘ncurses’
    require ‘logger’
    require ‘rbcurse’
    require ‘rbcurse/rwidget’

    (yes, that’s it)

    ##### GEM VERSIONS
    bash-4.2$ gem list

    *** LOCAL GEMS ***

    bigdecimal (1.1.0)
    ffi (1.3.1)
    ffi-locale (1.0.1)
    ffi-ncurses (0.4.0)
    io-console (0.3)
    json (1.7.6, 1.5.4)
    minitest (4.5.0, 2.5.1)
    ncurses (0.9.1)
    rake (10.0.3, 0.9.2.2)
    rbcurse (1.5.2)
    rbcurse-core (0.0.3)
    rbcurse-extras (0.0.0)
    rdoc (3.12, 3.9.4)
    rdoc-data (3.12)

    ##### RUBY VERSION
    bash-4.2$ ruby -v
    ruby 1.9.3p327 (2012-11-10 revision 37606) [x86_64-linux]

    ##### OS
    bash-4.2$ uname -a
    Linux slackware-vm 3.2.29 #2 SMP Mon Sep 17 14:19:22 CDT 2012 x86_64 Intel(R) Xeon(R) CPU E5462 @ 2.80GHz GenuineIntel GNU/Linux

    joshuakeith

    January 26, 2013 at 1:38 am

  5. I also checked on my snow leopard box and get the following results:
    ##### ERROR
    1.9.3-p374 :003 > require ‘rbcirse’
    LoadError: cannot load such file — rbcirse
    from /Users/jkeith/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require’
    from /Users/jkeith/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require’
    from (irb):3
    from /Users/jkeith/.rvm/rubies/ruby-1.9.3-p374/bin/irb:16:in `’
    1.9.3-p374 :004 > require ‘rbcurse’
    TypeError: Panel is not a class
    from /Users/jkeith/.rvm/gems/ruby-1.9.3-p374/gems/rbcurse-core-0.0.3/lib/rbcurse/core/system/panel.rb:5:in `’
    from /Users/jkeith/.rvm/gems/ruby-1.9.3-p374/gems/rbcurse-core-0.0.3/lib/rbcurse/core/system/panel.rb:2:in `’
    from /Users/jkeith/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require’
    from /Users/jkeith/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require’
    from /Users/jkeith/.rvm/gems/ruby-1.9.3-p374/gems/rbcurse-core-0.0.3/lib/rbcurse/core/system/window.rb:18:in `’
    from /Users/jkeith/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require’
    from /Users/jkeith/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require’
    from /Users/jkeith/.rvm/gems/ruby-1.9.3-p374/gems/rbcurse-core-0.0.3/lib/rbcurse.rb:3:in `’
    from /Users/jkeith/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `require’
    from /Users/jkeith/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require’
    from /Users/jkeith/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require’
    from (irb):4
    from /Users/jkeith/.rvm/rubies/ruby-1.9.3-p374/bin/irb:16:in `’
    1.9.3-p374 :005 > q

    ##### OS
    MacPro:Downloads jkeith$ uname -a
    Darwin MacPro.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386

    ##### GEMS
    MacPro:Downloads jkeith$ gem list

    *** LOCAL GEMS ***

    bigdecimal (1.1.0)
    bundler (1.2.3)
    ffi (1.3.1)
    ffi-locale (1.0.1)
    ffi-ncurses (0.4.0)
    io-console (0.3)
    json (1.5.4)
    minitest (2.5.1)
    ncurses (0.9.1)
    rake (10.0.3, 0.9.2.2)
    rbcurse (1.5.2)
    rbcurse-core (0.0.3)
    rbcurse-extras (0.0.0)
    rdoc (3.9.4)
    rubygems-bundler (1.1.0)
    rvm (1.11.3.6)

    ##### RUBY VERSION
    MacPro:Downloads jkeith$ ruby -v
    ruby 1.9.3p374 (2013-01-15 revision 38858) [x86_64-darwin10.8.0]

    joshuakeith

    January 26, 2013 at 3:49 am

  6. For those that got errors like mine (above), you were most likely following the tutorial and it appears that it is a bit outdated. Instead of using require ‘curses’, you need to require ‘ffi-ncurses/ncurses. Still some warning that crop up, but rbcurse seems to work after that.

    joshuakeith

    January 26, 2013 at 4:12 am

  7. I am sorry the errors you encountered. Please give me a link to the tutorial so i can update it. I’ve been wanting to totally revamp the tutorial because that’s the first thing a person checks out, and if its uninteresting or outdated people get turned away.

    Most people get errors because they start writing a program from scratch rather than running some examples and seeing that it is all working. Then building a program based on some example, or comparing one’s code to some running examples.

    After moving to ffi-ncurses, all those ncurses-ruby related errors have stopped — that was the one thing that used to prevent people from using rbcurse — they could not get ncurses-ruby installed on OSX without fiddling with the C source code.

    totalrecall

    January 26, 2013 at 11:19 am

  8. The tutorial can be found here: http://rbcurse.rubyforge.org/tut0.html. I have not had the chance to do extensive work with rbcurse yet, but I am planning on using it as part of my linux distribution installer so I’m sure I’ll find some issues for you. What is the best way for you to keep track of them?

    joshuakeith

    January 28, 2013 at 11:19 pm

  9. On Mon, Jan 28, 2013 at 11:19 PM, The Accidental Rubyist wrote:

    > > New comment on your post “rbcurse-extras 0.0.0 released” > Author : joshuakeith (IP: 216.189.141.127 , MEN-AI2-141-127.wcta.net) > E-mail : hinokata@gmail.com > URL : http://gravatar.com/joshuakeith > Whois : http://whois.arin.net/rest/ip/216.189.141.127

    totalrecall

    January 29, 2013 at 12:26 am


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: