The Accidental Rubyist

invalid byte sequence in UTF-8

Archive for February 2009

rbcurse 0.1.2 gem released

with 3 comments

Version 0.1.2 of rbcurse (Ruby Curses Widgets) has been released. Minor enhancements:

  • search in textview, textarea with wrap-around, case insensitive and highlighting searched text
  • table can have nil data to start with
  • tabbed pane hasĀ  ok button by default, can set ok_cancel etc
  • table autosizing – required for adhoc queries
  • table horizontal scrolling – if more columns than can be shown
  • Table editing when more columns than viewable in table
  • Confirm dialog, normal mnemonics for buttons (in addition to Alt-o, Alt-c etc)

I expect to release 0.1.3 by Feb 28th, with more minor tweaks. See http://rubyforge.org/frs/?group_id=7775

Written by totalrecall

February 22, 2009 at 10:16 pm

Posted in ruby

Sample: SQL Client in ruby ncurses

with 3 comments

I am putting up a small SQL Client made in about 3 hours using rbcurse. The idea of course was to see deficiencies in the library, and yes, for adhoc queries auto_sizing of columns is required. Need to work on that.

quick dirty sql client

quick dirty sql client

The demo shows a textarea, enter a query and press Run to see the results in a table. The listbox on top-right shows the tables in the database, pressing Space on any will show its columns in the second list. Pressing Enter will display its data in the table.

The idea of the columns is to select columns and have the names be pushed to the textarea, or auto-generate SQL’s.Similar to sqlminus (sourceforge project).

I will put in some more work on this, just to find out how rbcurse can be improved more.

Image Link
Video Link.

Written by totalrecall

February 14, 2009 at 12:50 am

Posted in ncurses, rbcurse, ruby

Update on Finder app (ruby curses)

leave a comment »

A very rough demo (7 mb) of the app (sorry, its hastily done with no planning) and a couple screens. The aim is really to find loopholes in the ruby curses widgets and framework. I have while making this added the ability to easily get radio buttons and checkboxes onto dialog boxes. You almost always need them in dialogs in a serious application. The Finder (file explorer) demo actually does quite a lot and i will keep enhancing it slowly.

File explorer sample app

File explorer sample app

Next application is to do a basic SQL viewer using the curses Tables. I intend making different kinds of apps with basic functionality to see that the widgets provide what is needed.

rubygem

I have also registered for a project on rubyforge, and will try creating a gem using HOE and uploading. Then I can keep releasing rbcurse as a gem.

Written by totalrecall

February 9, 2009 at 11:01 pm

Posted in ruby

Finder app using ruby curses widgets

leave a comment »

After some work on a TODO app, which used editable tables and other widgets, I have started a sort of Finder app with 2 panes, like Midnight Commander. Shows how easy it is to put up something with minimal code using the Listbox widget.

This will also use the TextView for viewing files, TextArea for editing files (or your EDITOR). The aim of this application, as was the aim of the TODO, is to see how well the widgets fare when we use them for something useful.
Here’s a very rough pic, will keep updating this link as things improve.

file explorer application using rbcurses widgets

file explorer application using rbcurses widgets

(Offtopic: am recovering from a bad cold, but will take longer to recover from Roger’s loss at AO).

Written by totalrecall

February 2, 2009 at 10:38 pm

Posted in rbcurse