leue@galen.crd.ge.com (Bill Leue) (05/21/91)
I'm having a problem getting the Help Package in OW 2.0 to work. I've generated a tiny test program which incorporates the code examples of the O'Reilly Xview manual (Rev 2), Chapter 21, but all it does is beep when I press the help key. Has anyone gotten this thing to work? The program is so tiny, I'll include the share file right here. As well as the code shown, I've tried all "reasonable" varients; e.g., putting the '.info' file in /usr/lib/help, in $OPENWINHOME/lib/help, etc., but all to no avail. Thanks for any insights! -Bill Leue leue@crd.ge.com - - - - - - - - - - - cut here - - - - - - - - - - - - - - - - - - - #! /bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh <file", e.g.. If this archive is complete, you # will see the following message at the end: # "End of shell archive." # Contents: README Makefile htest.c htest.info # Wrapped by leue@galen on Mon May 20 09:23:00 1991 PATH=/bin:/usr/bin:/usr/ucb ; export PATH if test -f README -a "${1}" != "-c" ; then echo shar: Will not over-write existing file \"README\" else echo shar: Extracting \"README\" \(459 characters\) sed "s/^X//" >README <<'END_OF_README' X'htest' - program to demo puzzling problem with Xview 2.0 Help Package. X XFiles: X htest.c program source X Makefile type 'make htest' X htest.info info file for help X XThe 'htest' program sets the HELPPATH environment variable to './' Xtemporarily so that the "htest.info" file will be found in the Xcurrent directory. You should be able to position the mouse pointer Xover the "Quit" button and press the Help key, but all the program Xdoes is beep. X END_OF_README if test 459 -ne `wc -c <README`; then echo shar: \"README\" unpacked with wrong size! fi chmod +x README # end of overwriting check fi if test -f Makefile -a "${1}" != "-c" ; then echo shar: Will not over-write existing file \"Makefile\" else echo shar: Extracting \"Makefile\" \(107 characters\) sed "s/^X//" >Makefile <<'END_OF_Makefile' X.SCCS_GET: X Xhtest: htest.o X cc -g -o htest htest.o -lxview -lolgx -lX X Xhtest.o: htest.c X cc -c -g htest.c X END_OF_Makefile if test 107 -ne `wc -c <Makefile`; then echo shar: \"Makefile\" unpacked with wrong size! fi chmod +x Makefile # end of overwriting check fi if test -f htest.c -a "${1}" != "-c" ; then echo shar: Will not over-write existing file \"htest.c\" else echo shar: Extracting \"htest.c\" \(876 characters\) sed "s/^X//" >htest.c <<'END_OF_htest.c' X X#include <stdio.h> X#include <xview/xview.h> X#include <xview/panel.h> X XFrame frame; XPanel panel; XPanel_item quit_button; Xvoid quit_proc(); X X Xmain(argc, argv) X int argc; X char **argv; X{ X X char buf[256]; X X X xv_init(XV_INIT_ARGC_PTR_ARGV, &argc, argv, 0); X X strcpy(buf, "HELPPATH=./"); X putenv(buf); X X frame = xv_create(NULL, FRAME, X FRAME_INHERIT_COLORS, TRUE, X 0); X X panel = xv_create(frame, PANEL, X WIN_X, 0, X WIN_Y, 0, X XV_WIDTH, 200, X XV_HEIGHT, 100, X 0); X X quit_button = xv_create(panel, PANEL_BUTTON, X XV_X, 10, X XV_Y, 50, X PANEL_LABEL_STRING, "Quit", X PANEL_NOTIFY_PROC, quit_proc, X XV_HELP_DATA, "htest:quit_button", X 0); X X window_fit(frame); X window_main_loop(frame); X} X Xvoid quit_proc(item, event) X Panel_item item; X Event *event; X{ X _exit(0); X} X END_OF_htest.c if test 876 -ne `wc -c <htest.c`; then echo shar: \"htest.c\" unpacked with wrong size! fi # end of overwriting check fi if test -f htest.info -a "${1}" != "-c" ; then echo shar: Will not over-write existing file \"htest.info\" else echo shar: Extracting \"htest.info\" \(61 characters\) sed "s/^X//" >htest.info <<'END_OF_htest.info' X:quit_button XClick this button to exit the program, dummy! X# END_OF_htest.info if test 61 -ne `wc -c <htest.info`; then echo shar: \"htest.info\" unpacked with wrong size! fi chmod +x htest.info # end of overwriting check fi echo shar: End of shell archive. exit 0