[Chicago-talk] perl GUI question
shlomif at iglu.org.il
Tue Mar 23 01:50:12 PDT 2010
On Tuesday 23 Mar 2010 01:58:14 Richard Reina wrote:
> Thanks for the input. Unfortunately from what I can tell both wxperl and
> perl/Gtk are very similar to perl/tk in that they are very mouse prone.
While you can use the mouse to operate wxPerl and Perl/Gtk+ apps, you can also
fully operate them using the keyboard (assuming they are written properly.)
> Don't get me wrong I like Tk and use it, for certain things it can't be
> beat. However, for this particular instance I am dealing with a menu
> that's built from the results of a database query and I am looking for
> something with the feel of a scroll down menu using arrow keys that won't
> make the user grab for their mouse.
I see that Cmenu is http://search.cpan.org/dist/Cmenu/ . It hasn't been
maintained since 2001 and the code shows many vestiges of ancient Perl. I
suggest against using it.
> Something like this.
> # Sample Cmenu script
No strict, no warnings.
> use Cmenu;
> menu_initialise("Cmenu Sample Script");
> menu_init("Menu Title","Menu Help Text");
> menu_item("Option 1","gimme1");
> menu_item("Option 2","gimme2");
> menu_item("Option 3","gimme3");
> chop($sel = menu_display("Menu Prompt"));
chop? Don't you want chomp instead? And why do you need it in the first place?
> menu_terminate("bye bye");
And a procedural, global interface.
> I just need a way to make the choices colored in order to fit into my
I suggest you write something using http://search.cpan.org/dist/Curses/ or
http://search.cpan.org/dist/Curses-UI/ if you wish to have a terminal-based
UI. Otherwise, just use wxPerl or something.
Shlomi Fish http://www.shlomifish.org/
"The Human Hacking Field Guide" - http://shlom.in/hhfg
Deletionists delete Wikipedia articles that they consider lame.
Chuck Norris deletes deletionists whom he considers lame.
Please reply to list if it's a mailing list post - http://shlom.in/reply .
More information about the Chicago-talk