LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-21-2002, 12:53 AM   #1
joeuser
LQ Newbie
 
Registered: Dec 2002
Posts: 2

Rep: Reputation: 0
Problem with ncurses and spaces


I am writing an ncurses application that clears fields on the screen by writing spaces to them. For longer fields (greater than 15 characters or so) this doesn't seem to work properly. It behaves as if ncurses is ignoring the updated characters and not sending them to the terminal. This happens despite the fact that I am calling wrefresh() after updating the characters. For example, suppose I have a field that initially contains "abcdefghijklmnopqrstuvwxyz". I attempt to clear the field using the following code:

waddstr(hWindow,
" "); // String of 26 space characters
wrefresh();

When I execute this code, there is no visible effect on the terminal screen; it's as if ncurses doesn't recognize the modified characters, or suppresses sending them to the terminal for some reason.

However, as soon as I modify the screen in any other way (such as writing a single non-blank character to any location of the screen and then calling wrefresh()), the previously-cleared field is instantly updated on the terminal screen, too. It's as if the first update is "deferred" pending the subsequent update.

I haven't a clue as to why ncurses behaves this way, and don't know if it's a subtle bug of some sort, or a procedural error on my part.

Anyway, if anyone can shed some light on this, I'd certainly appreciate it. Thanks!

Last edited by joeuser; 12-21-2002 at 11:11 AM.
 
Old 12-21-2002, 01:00 AM   #2
joeuser
LQ Newbie
 
Registered: Dec 2002
Posts: 2

Original Poster
Rep: Reputation: 0
(deleted by poster)

Last edited by joeuser; 12-21-2002 at 11:13 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ncurses problem sjp Programming 7 01-26-2005 06:15 AM
Problem with ncurses ina Programming 0 11-29-2002 08:29 AM
Problem ncurses ina Linux - Software 1 09-19-2002 02:37 AM
Problem ncurses ina Linux - General 0 09-19-2002 01:50 AM
ncurses-5.2-28 conflicts with file from package ncurses-5.2-12 tubby Linux - Software 4 06-16-2002 12:00 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration