[prog] ncurses forms library

ed orphan millward at Ms.UManitoba.CA
Wed Nov 5 21:13:37 EST 2003


Thank you very much for the code!
Now I can get input from the form and
get something done. 
Just a couple of questions about how
this input works.
   Where does the keyboard input
go during the ch = getch loop?
I assume  form_driver( my_form, ch);
places it into  field[0],  yes?
But when I try to track this input using
DDD debug  ( p field[0]@10 ), I can't
see anything going in. When I enter
123, shouldn't I see the something like
 31, 32, 33  inside  field[0] ?
     Why is it necessary to use 
     REQ_END_LINE ?
ch = '\n';
form_driver( my_form, ch );
form_driver( my_form, REQ_END_LINE );
buff = field_buffer(field[0], 0);
assert( buff != 0 );
mvprintw(17,4, "buff = %s\n", buff);
refresh();
    I thought the form_driver automatically
incremented to the right before entering 
the next character Y/N ?
    Thanks a lot for all your help! I would
never have figured it out on my own.
    



More information about the Programming mailing list