3 Replies Latest reply on Nov 9, 2006 8:16 AM by catamaran

    Questions about CSH

    tswaters1 Level 1
      Hello ello !

      We've got this HGUE web-based java application which is maintained by contractors in another country, so maintenance is a nightmare and thus I'd like to get it right the first time, with as little contact with the developers as possible..... I'm trying to get a solution where the developers do a sort of "1 time fix" for each page, and after that the help be completely maintained by me or someone in my position.

      So I've plugged around on the forums looking for information on implementing CSH and I've got a few questions.....

      1) How much work is required by the developer to set up a link to WebHelp with a MapID? I've read posts about confused developers that don't know how to link to WebHelp -- is it as simple as importing the API library and calling the RH_ShowHelp with correct parameters?

      2) "Prefix Map IDs with:" -- what is this for? I've tried to prefix with something, but trying to call "RH_ShowHelp" with the updated last parameter won't find the topic..... Any extra information on this would be greatly appreciated

      3) Is it possible to customize the MapIDs to include different prefixed text? The "prefix map ids" kind of does this (if i could ever get it to work!) -- but it doesn't allow for different prefixes. Can I open up the .H file and manually set these?

      Ideally, for the ease of the developers, I'd like the function call to be something like this on all pages,
      RoboHelp_CSH.RH_ShowHelp(0, " http://www.server.com/webhelp/index.htm", HH_HELP_CONTEXT, %%pagename%%);

      The problem here is that %%pagename%% can include different alpha characters preceding the page number -- not to mention there's some error codes that are in the WebHelp project that would also be good to link to, but they include a vast array of different alpha characters.....

      If I'm unable to use alpha characters in the mapID, the problem I foresee is that I'll need to use numeric MapIDs and then I'll need a long list of the MapIDs used, and where within the application they are called -- it's a bit of a maintenance nightmare considering there are over 300 pages and some 250+ error codes.

      Any help or tips -- or suggestions --- anything would be greatly appreciated.


      -Tyler Waters
        • 1. Questions about CSH
          tswaters1 Level 1
          Ok! I've got it.

          I was completly out of ideas just looking around my webhelp's publish directory when suddenly I notice a certain file I hadn't seen before which might help me... "index_csh.htm", which has a basic frameset with "cshdat_webhelp.htm"

          Inside cshdat_webhelp.htm, down on the mainline, I find some interesting comments,
          // VH 05/16/00 now support
          // TopicID=
          // TopicNumber=
          // RemoteURL=
          // and WindowsOptions
          // with the format #a=xxx,b=xxx,c=xxx...

          OOooOOo.... this looks to be exactly what I need.
          So here's my example, a TopicID of "myMapId" with a topic url of "test.htm"

          So, I try out a link to: http://www.server.com/webhelp/index_csh.htm#TopicID=myMapId
          and it works almost as well as I'd hoped. it displays test.htm with the "show" link and no framset.

          Looking through the code, I eventually find out what comment "and WindowOptions" means. Including a "," followed by any window options will load the window with desired options. What, might you ask, are the window options? well.... i'm not exactly sure what all the options are, but the one I could find is "withnavpane=true". Include that in the link and the navigation pane will display.....


          will load tes.htm with the navigation pane.
          Wohoo !
          • 2. Re: Questions about CSH
            tswaters1 Level 1
            A little more on context sensitive help.... I don't really have a place to post my findings in research, so here seems a good a place as any. I just hope I include enough keywords to help anyone else in the future trying to figure this damn thing out.


            there's one thing I never got, if you look at the contents of the BSSCDefault.h file, it includes lines in the format:
            #define [topicid] [mapid]

            where are the mappings to the topics actually stored? The answer: [projecname].ali

            This file includes a series of lines in the format,

            Sooo.... if ever you want to get away from the annoying "All Map IDs" dialgoue, which I've found doesn't work entirely as well as it should, I believe you can manually edit the [projectname].ali and get the same result

            Oh, one other thing. On Peter Grainge's site on using mapids with merged projects,

            There's a big long instruction manual which includes a whole lot of copying and pasting and messing with the .H files.... I've found that I don't need to do any of that if I call the project from "index_csh.htm#topicId=[topicid],withnavpane=true" -- thanks to a few ingenious lines in "cshdat_webhelp.htm" in the master proejct...

            Normally, the cshdat_webhelp.htm includes a series of javascript lines to populate all the mapids:
            e.g. SetCsh(x,[topicID],[mapID],[relativePath]); -- there's one of these for each MapID, i imagine it's populated upon generation

            When there's merged projects involved, there's a call for each merged project,
            e.g. addRemoteProject("mergedProjects/[childdirectory]");

            this in turn picks up all the CSH data from the child projects and makes life much easier...... I think it may actually be theoretically possible to have a "remote project" that's not even a merged project. I'm not sure why you would want to do it, but in theory I think you can change the one parameter to be any URL

            it's almost as if the people who originally wrote these seemingly endless series of javascript library files had some sort of master plan *excuse my pun* -- if only the files were documented *sigh*.
            • 3. Re: Questions about CSH

              Bravo! Your find looks valuable and should save much time, if I understand it. Did it work in production as you intended?

              I'll plan to use your method. We have merged RHx5 WebHelp, which is not CSH. Development uses C# for .NET. We're planning a spring CSH using WebHelp, NOT Pro/RoboEngine.

              We want to use mapids to automatically get a list of all the asp pages being used. Also, it looks like we need to give dev the Microsoft download example for calling from C# .

              Thanks for your post, and we look forward to any information you've learned since.