Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: [1]
  Reply  |  Print  
Author Topic: Message files and SHOWHELP  (Read 7705 times)
Jim M.
Posts: 5


« on: June 16, 2015, 04:25:55 pm »

We've just started using message files and the SHOWHELP function to implement some very limited context-sensitive help.

Is there any way we can customize the interface?  Specifically we would like to rename the 'Screen' and 'Resume' buttons.

Also:  Is there any way to have the help open in a child window?

Finally:  is there any way to format the help text?  I have discovered that adding html coding does not work.

Thanks,
Jim
Reuben B.
Four Js
Posts: 1062


« Reply #1 on: June 17, 2015, 12:26:12 am »

Jim,

Rather than answering your questions directly, I'll give our existing developers a chance to provide some examples of how they have implemented help in their applications.

What I will point out for you is that if you look in FGLDIR/src and FGLDIR/lib, you will see some files named fglhelp.* that contain the code that is executed when showhelp is called.   You can override these functions by placing a function with the same name and signature higher up in the search path.

Reuben

Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero
Reuben B.
Four Js
Posts: 1062


« Reply #2 on: June 19, 2015, 12:15:44 pm »

Hopefully you found the fglhelp files in FGLDIR/src and can see how the showhelp function is implemented.

To see what I mean by overriding the function, add to your .4gl ...

Code
  1. FUNCTION showhelp(i)
  2. DEFINE i INTEGER
  3.  
  4.    MESSAGE i
  5. END FUNCTION

and note what happens.  So you can customize showhelp() completely as you like from that starting point.

Quote
Specifically we would like to rename the 'Screen' and 'Resume' buttons.
If you wanted to just rename the 'Screen' and 'Resume' buttons, you'll note that in fglhelp.per, they are defined TEXT=%"fgl.helpViewer.screen"

so if you added to your strings (.str) file an entry for this token, e.g.
fgl.helpViewer.screen = "My Screen Button Text"

then you can customize that way without overriding the .4gl or .per

Quote
Is there any way to have the help open in a child window?

By default it should.  It should open the window with style="viewer".  I wonder if you have omitted that style from your .4st.  Have a look in FGLDIR/lib/default.4st for the viewer entry and add to your .4st if you have.

Quote
Finally:  is there any way to format the help text?  I have discovered that adding html coding does not work.

 It should as it is displayed to a TEXTEDIT which will by default has htmlFormat.  A quick test with HTML code for bold worked for me.  Again check your .4st and make sure you haven't disabled the use of html for textedits.

Hope that helps,

Reuben

Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero
Jim M.
Posts: 5


« Reply #3 on: June 22, 2015, 03:49:36 pm »

Thanks for the help,  we won't have time to try this out immediately but it sounds like this advice should take care of our issues.
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines