The Accidental Rubyist

invalid byte sequence in UTF-8

Version 1.2.0 rbcurse

with one comment

Install gem install rbcurse --pre
I’ve been working on many new things … new control such as tree, vimsplits, dividers, scrollbars, progressbars, links — lost count of all the things I’ve added. Had to make some tiny changes htat are not backward compatible to make the widgets more usable.

Most importantly is the App class which allows the user to make applications. All the ncurses mumbo-jumbo and even the rbcurse incantations are neatly wrapped in an call and your block contains the app. Also, all widgets are wrapped into methods much like Shoes does, so they are easy to call without having to know what all has to be called.

I’ve introduced stacks and flows (conceot copied from Shoes). Its rough but allows us to stack widgets and the stack does the placement. Similarly, we can horizontally place buttons. It’s rough since it’s not yet a class, so it does not hold information. It places the widgets once and for all on the screen. Stacks and flows don’t persist in any way as objects that can be manipulated later. That shall come later, without changing the API.

Much like vim and other terminal programs, you can now suspend work, show some information outside of ncurses and come back into your ncurses app. Or allow the user to use the shell and return.

I am focusing on user interface patterns such as MasterDetail – see sample appemail.rb (you need to point it to a local mbox). I’ve also used a tree control for directories and a Listbox for directories which allows user to click and go down directories. I intend separating these from their demos so they can be reused. They contain basic functionality and there’s a lot more that can be added to make them complete.

Another pattern is ColumnBrowse


Written by totalrecall

October 10, 2010 at 7:33 pm

Posted in ruby

One Response

Subscribe to comments with RSS.

  1. To install 1.2.0 as of Jan 1, 2011, please use the “–pre” (double minus) with “gem install” since it is a pre-release.

    gem install rbcurse –pre

    (pre has TWO hyphens before it)


    January 2, 2011 at 8:20 pm

Leave a Reply

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

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

Google photo

You are commenting using your Google 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 )

Connecting to %s

%d bloggers like this: