[sf-perl] GUI question

Richard Reina gatorreina at gmail.com
Wed Apr 7 19:21:51 PDT 2010


Years ago I wrote a database API for our office. It basically manages the
data entry flow and keep users informed of the status of various
transactions.  You might laugh but I kept it very simple: perlmenu(a curses
based menu module)->perl-DBI->MySQL. It still works very well there's just
one thing I would like to change but can't find a GUI to do it.

There's a DBI call that lists active transactions and prints them to the
screen. What's great is that ANSI:color is used to color the text that is
printed to the screen according to the status of the transaction.  Red
flashing needs immediate attention, yellow second most, blue is almost done,
etc. At the bottom of the screen when the while ($sth->fetch) loop is
finished the user is prompted to type in the ID number of the transaction
that he wants to access. This is getting more cumbersome as the user has to
focus his eyes on the line of text and type in the five digit transaction
number and type it in and press enter. I would be much easier and quicker to
have this list as a menu that the user can scroll down and just hit enter
when he gets to the one he wants.

I have found a way to do this with both perlmenu and Cmenu but I lose the
ability to display the transactions in different colors. From what I
understand perl Tk and wxWidgets also will not allow me to do it (print menu
text (choices) in color).  Does anyone know of a way to do this? That is,
have a menu that is constructed from an SQL query that can print the menu
options in different colors? I once heard that with perl what's impossible
is hard and what is hard is easy.  I am hoping I can make that saying ring
true.

Thanks for any ideas.

Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/sanfrancisco-pm/attachments/20100407/e0936a08/attachment.html>


More information about the SanFrancisco-pm mailing list