[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problem with forms and ncurses
From: |
Ron Gage |
Subject: |
Problem with forms and ncurses |
Date: |
Sun, 07 Jan 2007 16:58:32 -0500 |
User-agent: |
Thunderbird 1.5.0.9 (X11/20061206) |
Greetings:
First I apologize for using a "bugs" mailing list for support, but there
doesn't appear to be any other avenues for support with ncurses and forms.
Basically, I can't get forms to work. More specifically, I believe I am
following the correct steps to get forms working (create the field
objects, create the form from the field objects, post the form to the
display, and refresh) and it's not displaying anything!
I know curses is working because mvprintw is working fine as is getch.
By following the examples in the online programming guide, I think I am
doing things right. Here are the relevent snippets from my code...
---------------------------------------------
field[0] = new_field(1,24,1,15,0,0);
field[1] = new_field(1,16,1,45,0,0);
field[2] = new_field(1,16,1,65,0,0);
field[3] = new_field(1,8,2,20,0,0);
field[4] = new_field(1,4,3,35,0,0);
field[5] = new_field(1,8,3,50,0,0);
field[6] = new_field(10,60,5,5,0,0);
field[7] = new_field(1,5,17,5,0,0);
field[8] = new_field(1,5,17,25,0,0);
field[9] = new_field(1,8,17,45,0,0);
field[10] = NULL;
for (f=0; f< 4; f++)
{
set_field_back(field[f],A_UNDERLINE);
field_opts_off(field[f],O_AUTOSKIP);
field_opts_off(field[f],O_ACTIVE);
}
for (f=4; f<10; f++)
{
set_field_back(field[f],A_UNDERLINE);
field_opts_off(field[f],O_AUTOSKIP);
}
set_field_buffer(field[0],0,serialnum);
set_field_buffer(field[1],0,make);
set_field_buffer(field[2],0,model);
set_field_buffer(field[3],0,devname);
initscr();
cbreak();
noecho();
raw();
nonl();
intrflush(stdscr, FALSE);
keypad(stdscr,TRUE);
form = new_form(field);
post_form(form);
set_current_field(form, field[4]);
refresh();
mvprintw(1,1,"Key Serial:");
mvprintw(1,39,"Make:");
mvprintw(1,58,"Model:");
---------------------------------
The data is making it into the char * pointers correctly as I have some
debug printing running that shows the correct data. Moving the
initialization calls to above the field definitions makes absolutely no
difference.
Again, without the mvprintw statements, I get a totally blank screen.
Any ideas on what I doing wrong here?
Ron Gage
- Problem with forms and ncurses,
Ron Gage <=