Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Strange Curses behaviour

by Anonymous Monk
on Nov 02, 2015 at 19:53 UTC ( [id://1146747]=note: print w/replies, xml ) Need Help??


in reply to Strange Curses behaviour

#!/usr/bin/perl # http://perlmonks.org/?node_id=1146715 use strict; use warnings; use Curses; END{ endwin(); }; initscr; curs_set(0); clear(); noecho(); halfdelay(30); my $win1 = Curses->new( 7, 30, 5, 5); refresh(); ########################### Curses seems to need this line $win1->box(ACS_VLINE, ACS_HLINE); my $char = -1; while(1) { $win1->addstr( 2, 2, scalar(localtime)); $win1->addstr( 4, 10, "Char: $char "); $win1->refresh; if(!@ARGV) { sleep 3; } else { $char = getch(); } }

Replies are listed 'Best First'.
Re^2: Strange Curses behaviour
by duncs (Beadle) on Nov 03, 2015 at 09:05 UTC

    Thank you - this has fixed my issue, although I don't understand why :)

    Using refresh on the window itself exhibits the same behaviour, as though this needs a global screen refresh before doing anything else.

    Thanks

    Duncs

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1146747]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2024-04-23 18:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found