bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Panels and pads


From: dabreegster
Subject: Panels and pads
Date: Sun, 29 Mar 2009 11:37:35 -0500
User-agent: KMail/1.9.9

From the mailing list I have discovered similar problems in the past with 
panels and pads, but I can't find a working solution to the issue, so I'd 
like to raise it again. I've reduced things to a simple test case in Perl, 
attached at the end.

The script runs, but the pad's contents are not preserved when I updatepanels 
and doupdate. Making subpads and trying copywin from pad to window haven't 
yielded success so far. What can I do?

#!/usr/bin/perl

use strict;
use warnings;
use Curses;

initscr();

my $one = newwin(10, 50, 0, 0);
my $onepad = newpad(100, 100);
$onepad->addstr(0, 0, "Line one hello!");
$onepad->addstr(1, 0, "Line one hello!");
$onepad->addstr(2, 0, "Line one hello but this one is waaaaaaay longer");
$onepad->addstr(3, 0, "Line one hello but this one is waaaaaaay longer");
$onepad->prefresh(0, 0, 1, 1, 8, 48);
my $onep = new_panel($one);
$one->box(0, 0);

my $three = newwin(10, 30, 0, 50);
my $threep = new_panel($three);
$three->addstr(2, 1, "Yawn");
$three->box(0, 0);

my $two = newwin(3, 50, 3, 5);
my $twop = new_panel($two);
$two->box(0, 0);
$two->addstr(1, 1, "Well hello");

update_panels();
doupdate();

endwin();

Attachment: bug.pl
Description: Perl program


reply via email to

[Prev in Thread] Current Thread [Next in Thread]