bug-ncurses
[Top][All Lists]
Advanced

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

Re: Panels and pads


From: Thomas Dickey
Subject: Re: Panels and pads
Date: Mon, 30 Mar 2009 21:00:24 -0400 (EDT)

On Sun, 29 Mar 2009, dabreegster wrote:

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?

I haven't done much with the curses-perl package (but I made an ncurses
debugging trace of your script, to see if I can spot the problem...)


#!/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();


--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net




reply via email to

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