Re: 4GL Help Numbers: Yuchh!
Posted in 1997
Jacob Salomon wrote: > > Hi family, > > I fishing for ideas again. > > Since I first experienced the 4GL HELP mechanism, with its help numbers > hard-coded in the 4GL code, I have wished for help labels as strings. > With strings I can use some kind of acronym for what the help message > means, which module or component of the application the help message is > for. I entered a feature request for such a modification to the help > mechanism AGES ago but that has vanished down the oubliette. > OK Jake, here's an idea: Download my code generator, mk_4gl1, and see how I use context-sensitive help for each field on a form. The help messages are stored in a table, as opposed to a file, or compiled in the program. Each field is mapped. Then when the user hits a help key, depending on the field they're in, they get a help pop-up for that field. By storing the help messages in a table you can change the help, or add to it without having to recompile the program(s). Messages can be of an unlimited length this way. The code generator also creates a series of popup functions, one for each field. You customize each popup function if you want, otherwise the code is dormant, and stays out of the way. A makefile is produced with another tool, make_mk. By the time the code generator is done you have basically everything you need for a one-table app. But the point here is to show you the context-sensitive help feature. From there, the sky's the limit. You can find this interesting tool at: http://www.mindspring.com/~tschaefe Look in the Storage section, under 4GL sources. There's a couple of small C programs that need to be compiled to help out the code generator, but they take two minutes or less to compile and you're on your way. Just get the shar files and run the makes. If you have problems with it let me know. > FourGen used a 4-part composite key (OK, 3 parts identify the body of > help text) and this sounds pretty good in principle. However, the > application I want to add help to was not generated with FourGen so this > would be a mighty big wheel to reinvent. > > Another idea I had was to write my help source file similar to the 4GL > help source, only using my desired acronyms instead of the hard-coded > numbers. I would then pipe my help source through a perl script that > would: > 1. Assign [sequential] numbers to the acronym strings. > 2. Insert the acronym/assigned-number into a database table. > > Of course, I could not use the HELP nnnn options in Input and menu > commands; in all cases I would have to use ON KEY clauses. But since I > have not written a blessed line of HELP code yet, this is not a major > obstacle. > > Can anyone out there improve on or refine this? Has anyone done this > already so that I don't have to reinvent a wheel? > Ub, well yeah... You can also create a separate help management screen that allows searches... :-) > Thanks. > -- > -- Jake (In pursuit of undomesticated aquatic avians) > > +-----------------------------------------------------------+ > | Impeccable Logic: A thought process which successfully | > | resists chicken bites | > +-----------------------------------------------------------+ Hmmm... hand me that mallet... -- Tim Schaefer \\\\|// tschaefe@mindspring.com (6 6) ------------------------oOOo---( )---o00o--------- http://www.mindspring.com/~tschaefe