bug-ncurses
[Top][All Lists]
Advanced

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

Bug in update_panel()


From: Rick Richardson
Subject: Bug in update_panel()
Date: Sat, 24 Nov 2001 15:19:58 -0600
User-agent: Mutt/1.2.5i

The panel library function update_panel() will not update curscr
unless new_panel() has been called at least once.

That is, if you use the panel man-page recommended sequence for updating
the screen:

        update_panel();
        doupdate();

it won't work unless new_panel() has been called at least once before.
But in many applications, panels will only be created later when the
user asks for them (such as a help panel).

There is a kludgy workaround.  Right after doing an initscr(),
use this code:

        del_panel(new_panel(stdscr));

This will create and delete a panel, which has the side effect of
making update_panel() do the right thing.

I don't know whether this bug is an attempt to be faithful to the SysV
curses implementation or not -- I don't have a System V box to for
testing handy at the moment.

-Rick

-- 
Rick Richardson  address@hidden      http://home.mn.rr.com/richardsons/
Twin Cities traffic animations are at http://tctraffic.0catch.com/

The last line of a right hand page should not end with a hyphen. This
has been a style rule for many years, yet it is amazing that most word
processors do not do this! I just smile when I pick up a book produced
with something like Frame and you immediately find these errors.
Needless to say, troff does this correctly, and has for 20+ years. A
friend commented to me that normal evolution would have gone Word to
Frame to troff, but instead, the computer industry has gone the other
way! -W. Richard Stevens, author of 7 popular technical books. [R.I.P.]



reply via email to

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