Quick fix for old bug in Prima::Terminals

From: David Mertens <dcmertens.perl_at_gmail.com>
Date: Thu, 13 Jan 2011 22:42:15 -0600
To: prima_at_prima.eu.org

Hello -

I came upon Prima recently and I'm really enjoying it. I'm working on
a REPL targeted toward PDL users. To make a long story short, I
stumbled upon Prima::Terminals. This code has a missing bracket at
line 649. The error is clearly due to the conversion from spaces to
tabs with version 1.16. Specifically, the offending line is this:

                $self-> { termView}-> set_cursor_pos( $self-> { charWidth} * $cursorCol,

Adding the missing piece gives this:

                $self-> { termView}-> set_cursor_pos( $self-> { charWidth} * $cursorCol,
                        $self->{ charHeight} * ( $self->{ textRows} - $cursorRow - 1));

Having made that correction, the program appears to run, but it does
not do anything interesting. Not surprising, since I'm working with an
abstract widget. I've looked through the code, but it has no
documentation and I've had a hard time understanding how it functions.
I looked at the version history of the module. It looks like it has
only had minor revisions since before the millennium, with the
majority of the code in place with the first CVS commit. Are there any
example scripts that use this class? Grep says no. :-(

I would be interested in using this widget if I knew how it worked. My
needs (for the REPL) are satisfied with the Prima::Edit widget for the
time being, but I would be happy to look over any working examples.

Thanks!
David
Received on Fri 14 Jan 2011 - 05:55:18 CET

This archive was generated by hypermail 2.2.0 : Sat 19 Mar 2011 - 18:35:07 CET