SOLVED: Curses::Widgets Runtime Error

SOLVED: Curses::Widgets Runtime Error

am 13.10.2007 21:01:22 von HaroldWho

My original problem was:

> The 'perl Makefile.PL' step seems OK. The 'make test' seems OK too, but when
> the Curses color test screen appears and I press a key (as instructed), the
> app terminates with 'Error 255.'
>
> I have an app that uses Curses::Widgets, and it fails with the message:
>
> "Curses function 'chgat' called with too many arguments at
> /usr/lib/perl5/site_perl/5.8.8/Curses/Widgets/ButtonSet.pm line 305."

This last message is the key. Most of the Widget set has calls to 'chgat'
like this:

$dwh->chgat($y, $x, $length, A_STANDOUT,
select_colour(@$conf{qw(FOREGROUND BACKGROUND)}), 0);

When all these calls are corrected to drop the null arg, like so:

$dwh->chgat($y, $x, $length, A_STANDOUT,
select_colour(@$conf{qw(FOREGROUND BACKGROUND)}));

the problem is solved.

Sincere thanks to Ekki Plicht and bzipitidoo for helpful comments.

HaroldWho
(who now has his Curses::Widgets back again)
--
Powered by Slackware 12.0 Linux -- Kernel 2.6.21.5-smp
News Reader slrn 0.9.8.1