in reply to Curses: removing a cursed Widget

Ahhh curses, how thou hath plagued me.

I looked for quite a while, and I couldn't see a way. What happens in curses I believe is that when something is drawn, stuff stays over it until it is drawn over. Basically objects don't clean up after themselves, and they have no particular relation between screen real estate, and the internal objects that govern them (as would a real window-driven UI such as the Finder or Windows)

That being said, you can either output characters over it, using various text positioning commands available to you through the curses library or you can use clear() on the screen(check out man ncurses for the full set).

Replies are listed 'Best First'.
Re: Re: Curses: removing a cursed Widget
by riffraff (Pilgrim) on Apr 15, 2002 at 15:07 UTC
    If that is the case (the last time I did any perl-curses stuff was in 95), you might try double-buffering. Keep a copy of what "should" be on the screen in memory somewhere (an array or something), and when you are going to change something, make a window (I guess), do your changes, and write the window to the same area.

    That is an idea, anyway...