0 Replies Latest reply on Aug 1, 2011 3:52 PM by Becky Williams

    Context-sensitive help API for Java (not Javascript)

    Becky Williams Level 2

      We’ve been working with some of our development teams to get them using the RoboHelp API instead of using bailing wire and duct tape to connect WebHelp to our apps. Most of our products are not doing CSH at this time, but this will bring them one step closer to implementing it, plus we want to standardize help windows by giving them a specific size and placement using the “window” feature.


      The problem I’ve encountered is with a team that’s using the Java (not Javascript) API. Here’s what we’ve done:


      • Writer added a window definition called main_help.
      • Writer added one map ID and mapped it to a topic, then exported the map file and delivered it to the developer. First question: Where does the developer put this file? At the root of the WebHelp root directory? (The RoboHelp help does not indicate where this is supposed to go.)
      • Writer generated the output and delivered it to developer.
      • Developer included RoboHelp_CSH.java into his project. Second question: Do we have the right version of the API? Ours is dated 9/23/2007 (probably the original with RH7).
      • Developer embedded the BSSCDefault.properties map file into the /help (WebHelp) directory. Note: Developer could not find any reference to this file within the API or the WebHelp output, so he’s not sure it’s being accessed.
      • Developer used the following parameters to call the help procedure:


                 file = AlertsProperties.getProperties().getProperty("HELP_FILE", defHelpFile);

                  if ((file == null) || (file.equals("")))


                      file = defHelpFile;


                  RoboHelp_CSH RoboHelp_csh = new RoboHelp_CSH();                       

                  String StrPathAndWindow = file;


                  RoboHelp_csh.RH_ShowHelp(0, StrPathAndWindow, RoboHelp_csh.HH_HELP_CONTEXT, 1);


      As mentioned, the string file is obtained from the application’s alertsclient.properties file. Here’s an example, but this is not the actual location of the help files. HELP_FILE=file\:///<virtual path>\\help\\help.htm>main_help


      The result is that the help ignores the window parameters and opens in the user’s browser with their default menu settings. The developer has dug into the code and found that only the whcshdata.htm file references the window, and this file does include the name and parameters entered by the writer. However, the majority of that file is commented out including the section that references the window name. I have verified that this is the way the file was generated from RH. I don’t know why, and I’m not sure how to change it or if it needs to be changed. The developer said he tried to remove the commenting, but he ended up with the same result.