From 837a13ef49870fa05d73202221429506a98f974e Mon Sep 17 00:00:00 2001 From: jkh Date: Tue, 28 Mar 1995 10:42:09 +0000 Subject: Tweak a few things just to show how form traversal might work fully. Fix some spelling errors in the example.c file and make error handling a little more explanatory. --- lib/libforms/examples/example.c | 6 +++--- lib/libforms/examples/example.frm | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'lib') diff --git a/lib/libforms/examples/example.c b/lib/libforms/examples/example.c index bfc7d92..39c4432 100644 --- a/lib/libforms/examples/example.c +++ b/lib/libforms/examples/example.c @@ -52,7 +52,7 @@ main() form = form_start("example"); if (!form) { - err(-1, "No form returned"); + err(-1, "No form `example' in example.frm returned"); exit(0); } @@ -62,7 +62,7 @@ main() tuple = form_get_tuple(global_bindings, "example", FT_FORM); if (!tuple) - err(0, "No such form"); + err(0, "No such form: example"); else form = (struct Form *)tuple->addr; @@ -82,7 +82,7 @@ main() wrefresh(form->window); if (form->status == FS_EXIT) { - printf("You're entries were:\n\n"); + printf("Your entries were:\n\n"); tuple = form_get_tuple(form->bindings, "input1", FT_FIELD_INST); printf("Input 1 = %s\n", ((struct Field *)tuple->addr)->field.input->input); tuple = form_get_tuple(form->bindings, "input2", FT_FIELD_INST); diff --git a/lib/libforms/examples/example.frm b/lib/libforms/examples/example.frm index f28b2c6..513ced2 100644 --- a/lib/libforms/examples/example.frm +++ b/lib/libforms/examples/example.frm @@ -46,9 +46,9 @@ Form example at 0,0 { field4 at 11, 2 field6 at 15, 2 - input1 {field3} at 7,45, next=input2 - input2 {field5} at 11,45, next=menu1 - menu1 {field7} at 15,45, next=quit - quit {field8} at 20,20, up = menu1, right = cancel - cancel {field9} at 20,43, next=input1 + input1 {field3} at 7,45, next=input2,down=input2,up=quit,right=input2 + input2 {field5} at 11,45, next=menu1,down=menu1,up=input1,right=menu1 + menu1 {field7} at 15,45, next=quit,down=quit,up=input2,right=quit + quit {field8} at 20,20, next=cancel,down=input1,up=menu1,right=cancel + cancel {field9} at 20,43, next=input1,down=input1,up=menu1,right=input1 } -- cgit v1.1