Make sure all topics have unique large context numbers UpdateContextNumbers(TEMP_MAX) Move to next topic aTopicId := HndTopics.GetTopicNext(aTopicId) Set the context number for the current topic HndTopics.SetTopicHelpContext(aTopicId, aCurrentNb) Iterate over topics while aTopicId '' do begin Get first topic aTopicId := HndTopics.GetTopicFirst() Update context number for all topics starting with "StartingAtNb" procedure UpdateContextNumbers( const StartingAtNb: Integer) This action should only be done when you design your help document and want to have a consistent set of Help Context numbers.Ĭonst // Temporary context number used. If you or your team mates are relying on Help Context numbers to access specific topics of your help file, you shouldn’t update those numbers. The second pass will set the final values. That’s why we make a first pass to set high context numbers for each topic. Instead of manually updating every single topic’s Help Context number by hand, let’s leverage HelpNDoc’s scripting capabilities to automate this repetitive and error-prone taskĪs HelpNDoc ensures that Help Context numbers are unique, we cannot iterate over each topic and set their Help Context number starting at 0 and up: other topics might already use those numbers which can break the clean iteration we are looking for. HelpNDoc script to reset Help Context numbers Thankfully, we can create a script to automatically reset the Help Context number of every topic to make sure the first topic starts at “0” and next topics’ Help Context numbers are incremented accordingly. Over time, Help Context numbers can be confusing as they are not always incremented from one topic to the next one. When a topic is deleted, let’s say the second one, its Help Context number is available for the next created topic: when the fourth topic is created, its Help Context number will be set to “1”. The second one is set to “1”, the third one is set to “2” and so on. When the first topic is created, its Help Context number is set to “0”. A numeric Help Context which is set to the lowest unique positive integer available in the project.An alpha-numeric Help Id which is set to a filtered version of the topic caption.HelpNDoc automatically creates two unique identifiers for every topic that you add to your project: Topic identifiers (Help Id and Help Context numbers) can be used to access a specific topic from a third party application: HelpNDoc ensures that each topic has a unique Help Id and Help Context number attached.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |