Help/id and chm files.

Author: i.sharp@pcisystems.co.uk (Iain Sharp)

We have just spent a while trying to work out why the documented method of using map/.ini files and help/id was not working properly for us. I am left with two questions. 

  1. Why does there have to be a blank line at the top of the <helpfile>.ini file? If the first line is [keywords] it doesn't work, if there's a blank line followed by the line with [keywords] on it does? This is also not documented, this took us an hour of faffing about before we lucked on to it. 
  2. Is there any way of having the chm path not be relative to the current working directory? If I put help/id "Jim","c:\tmp\fred.chm" I get an error about not being able to open "c:\apps\mydir\c:\tmp\fred.chm"

On a slightly related note, if we wanted every entity on every form component to respond to the ^HELP macro with a call to a global proc passing the component name, is there any way to set this up so that it is fire and forget, and doesn't require every entity (or dummy entity) painted on the form to have its HLPE trigger amended? Are there no form or template level help triggers or 'hidden' operations (like init and cleanup). regards, Iain 

11 Comments

  1. Further testing indicates that if the first line of the ini file is a comment, that works too, it doesn't have to be blank. 


    Author: Iain Sharp (i.sharp@pcisystems.co.uk)
  2. Iain Sharp said
    1. Why does there have to be a blank line at the top of the .ini file? If the first line is [keywords] it doesn't work, if there's a blank line followed by the line with [keywords] on it does? This is also not documented, this took us an hour of faffing about before we lucked on to it.
    2. Is there any way of having the chm path not be relative to the current working directory? If I put help/id "Jim","c:\tmp\fred.chm" I get an error about not being able to open "c:\apps\mydir\c:\tmp\fred.chm".

     1. When I check the .ini file for the ulibrary.ini then the first line is [keywords] and that seems to work. Are you sure that there's no extra "invisible" character on the first line that causes a problem? I'm pretty sure that the .ini file is read using the Standard Windows API (for INI files), but I have to check. 2. You can map the chm file to the desired location in the [FILES] section of your ASN file; e.g.

    [FILES] fred.chm = c:\tmp\fred.chm Hope this helps. Daniel


    Author: diseli (daniel.iseli@uniface.com)
  3. Hi Iain, As for the ^HELP issue - maybe using the at form level / appl level and remap the key via the keyboard translation tables could do the trick? It should give you a bubbling effect as well - through field / entity to component level - thus being able to offer help options at all three levels... HTH, Knut


    Author: Knut (knut.dybendahl@gmail.com)
  4. Hi Knut,  Was there something edited out of your text? Which trigger are you suggesting I use? The User Key? regards,  Iain


    Author: Iain Sharp (i.sharp@pcisystems.co.uk)
  5.  1. When I check the .ini file for the ulibrary.ini then the first line is [keywords] and that seems to work. Are you sure that there's no extra "invisible" character on the first line that causes a problem? I'm pretty sure that the .ini file is read using the Standard Windows API (for INI files), but I have to check. 2. You can map the chm file to the desired location in the [FILES] section of your ASN file; e.g.

    [FILES] fred.chm = c:\tmp\fred.chm Hope this helps. Daniel

    1. Odd, I will play some more. I don't think there was, but I'll check. 
    2. Okay, thanks, I am trying to deal with the issue about windows not wanting to show you the contents of a .chm file if it's stored on a network path, some of our installations are run from network paths, and whilst I can see the file from the help/id it won't show the text on the right. I'll see if we can work this out using the asn redirect. 

    regards,  Iain


    Author: Iain Sharp (i.sharp@pcisystems.co.uk)
  6. Hi Iain, Yes - indeed the '^USER_KEY' trigger found at FORM and APP SHELL level... Keep forgetting the formatting in WordPress kills anything with a html open / close tag around it... Knut


    Author: Knut (knut.dybendahl@gmail.com)
  7. Hi Iain, do you remember troubles with CHM on a network path, right? It is still reported at this address: http://unifaceinfo.com/downloads/download-info/opening-uniface-heplfiles-chm-on-a-server/ Hope it helps... Gianni


    Author: gianni (gianni.sandigliano@unifacesolutions.com)
  8. gianni said Hi Iain, do you remember troubles with CHM on a network path, right? It is still reported at this address: http://unifaceinfo.com/downloads/download-info/opening-uniface-heplfiles-chm-on-a-server/ Hope it helps... Gianni

    Hi  Gianni,  Yes, thank you, I found this one while checking the forums. I am hoping to get to something which doesn't involve us changing the registry to undo something microsoft have decided is a security fix. This is not because I am worried, but because, (as a VAR) we would have to persuade 40 different 'system administrators' that it was an acceptable change. Most of these being third party to us and our customers, making the conversations difficult.  Since our clients are installed on the local PC, I am thinking of putting the latest help on there as well using the patching routines, however, when they are running the testbed (latest version) to check before upgrading, the installation is only on the server, and the runtime directory is on a UNC path. So if the chm file was always relative to the runtime, it would always be based on a UNC path.  This is going to take moderately careful management of the asn files, but I htink it's do-able.  Regards, Iain


    Author: Iain Sharp (i.sharp@pcisystems.co.uk)
  9. Iain Sharp said On a slightly related note, if we wanted every entity on every form component to respond to the ^HELP macro with a call to a global proc passing the component name, is there any way to set this up so that it is fire and forget, and doesn't require every entity (or dummy entity) painted on the form to have its HLPE trigger amended? Are there no form or template level help triggers or 'hidden' operations (like init and cleanup). regards, Iain 

    Hello Iain, we have recently done this: in our menubar (which is visible in the whole application) we have a "Help" section - this is drop-down menu... one of the options here is something like "Help" - we have defined our own "Accelerator" for this option and in the .ini file we associated the F1 key to this accelerator. As long as the dropdown menu is static, this works fine. The F1 key fires the "Option" trigger and you can do whatever you want... We have tried dynamic menu for this, but unfortunately, there is a bug in Uniface and this accelerator sometimes works and sometimes just does not work. :-) So we were forced to make this "Help" options a static one (we have all other menus dynamic). Kind regards, Zdeněk Socha


    Author: sochaz (zdenek.socha@fullsys.cz)
  10. sochaz said We have tried dynamic menu for this, but unfortunately, there is a bug in Uniface and this accelerator sometimes works and sometimes just does not work. :-) So we were forced to make this "Help" options a static one (we have all other menus dynamic). Kind regards, Zdeněk Socha

     Hi Zdeněk Wie run into the same problems. We do have a dynamic menu wich is build up of different sub menus depending on the current component. The uppermost menu item in the tree of items do have an accelerator key assigned An accelerator does not work on first use, you have cklick the menu item first by mouse. After this first click, UnifAce remembers (sometimes) the accelerator and one can use the shortcut. If anyone has an idea to make this more comfortable ... Ingo


    Author: istiller (i2stiller@gmx.de)
  11. Iain Sharp said
     1. When I check the .ini file for the ulibrary.ini then the first line is [keywords] and that seems to work. Are you sure that there's no extra "invisible" character on the first line that causes a problem? I'm pretty sure that the .ini file is read using the Standard Windows API (for INI files), but I have to check.

     

    1. Odd, I will play some more. I don't think there was, but I'll check. 

    Maybe BOMs? https://en.wikipedia.org/wiki/Byte_order_mark Ingo


    Author: istiller (i2stiller@gmx.de)