Archive for February 2009
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
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.
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.
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.
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.
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.
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.
(Offtopic: am recovering from a bad cold, but will take longer to recover from Roger’s loss at AO).