curses problem
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > curses problem




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    curses problem  
atv


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-23-04 10:21 PM

Below is a piece of code for a menu. The use_console function is a
function that writes to a separate window trough a variable argument
list with vwprintw(). Everything works ok, but..

The first 2 messages (the 2 lines in the top piece of the code) are
dumped nicely on the console window. This because i refresh_all which
contains wrefreshes to all windows. However, when i select a menu
option, and use use_console() i do not get it on the console. It doesn't
matter where i refresh, it doesn't show.

I really don't know what the problem is. I can show the use_console()
code on request, but i don't think there is any problem there. In case
i select menu item 0, new_competition() is called fine, so there is no
problem there. It just doesn't write it to the console window. Or it
does, but doesn't refresh!

Any help most appreciated!
Kind regards,
atv


/* Status */
use_console("%s gestart in %s modus, klaar voor
gebruik!",argv[0],mode);
use_console("bla");

refresh_all();
while((c=wgetch(left))!=KEY_F(1)) {
switch(c) {
case KEY_DOWN:
menu_driver(menu,REQ_DOWN_ITEM);
break;
case KEY_UP:
menu_driver(menu,REQ_UP_ITEM);
break;
case 10: /* Enter */
switch(item_index(current_item(menu))) {
case 0: new_competition();
break;
case 1: use_console("keuze 1! %s",argv[0]);
break;
case 6: use_console("Statistieken wordt
afgesloten");
endwin();
exit(1);
break;
}
break;
}
}

sleep(1000);
endwin();
return 0;
}






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 01:26 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register