Author Topic: help: Sync with Table of Contents  (Read 2096 times)

jporkkahtc

  • Senior Community Member
  • Posts: 2620
  • Hero Points: 210
  • Text
help: Sync with Table of Contents
« on: August 31, 2017, 06:10:09 PM »
The SyncWithTableOfContents button too often doesn't work.

It has two failure modes (at least)
#1: The page isn't in the TOC, so Sync cannot work.
e.g.: This page p_active_form

#2: The page is in the TOC, and SyncToTOC sometimes works, but often/usually it doesn't - presumably because somehow the state of the help tool is weird.
I don't have an example handy, but I've often had this problem -- where sync to toc fails until I restart SlickHelp and try again.


I've also been using QtAssistant for the CMake help files.
CMake help files seem to have the opposite problem with the index that slick does -- it has far too many things it its index, where Slick has too few. (In CMake help, use the index to find "add_executable": A  "ChooseTopic" dialog appears with a few dozen possible matches)

I haven't seen problem #2 with CMake help though.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6823
  • Hero Points: 526
Re: help: Sync with Table of Contents
« Reply #1 on: August 31, 2017, 10:29:45 PM »
We haven't figured out why a lot of pages can't be synced with the table of contents. It seems like either there's a bug in the Qt help tools, some limitation, or some subtle syntax we're not aware of. Try "help Notifications". This item is definitely in the table of contents. It's the first item under "Editing Features". Sync with table of contents doesn't work. Seems like it doesn't work most of the time.

jporkkahtc

  • Senior Community Member
  • Posts: 2620
  • Hero Points: 210
  • Text
Re: help: Sync with Table of Contents
« Reply #2 on: August 31, 2017, 10:49:07 PM »
I've never worked with Qt help, except as a user.

Some of your links in the help file are weird.
For example, on that notifications page right-click on the "Notifications Option" and CopyLink.

The link is: qthelp://com.trolltech.examples.simpletextviewer/doc/ch12s11.htm#sect_options_menuanddialogs_98444_36798

Yet, many internal links are of the form
qthelp://com.slickedit.texteditor/doc/ch03s04.htm#sect_usingcommandline_13192_10728

Which seems more reasonable.

When I bookmark that Ch8 page, I get this URL:
qthelp://com.trolltech.examples.simpletextviewer/doc/ch08.htm#sect_featurenotification_57698_17486

But, I can replace that with
qthelp://com.slickedit.texteditor/doc/ch08.htm#sect_featurenotification_57698_17486
And it still works - so maybe this difference doesn't matter?
In any case, it does point to something weird in how you build the links as they aren't consistent.


jporkkahtc

  • Senior Community Member
  • Posts: 2620
  • Hero Points: 210
  • Text
Re: help: Sync with Table of Contents
« Reply #3 on: August 31, 2017, 10:58:37 PM »
Interesting ...

In the Help contents, expand:
Editing Features -> Notifications -> Feature Notifications -> Notification Tool Window
All of these point to the same content.

Click on Notification Tool Window.
Now, collapse all but the top level in the TOC.

Click on "Glossary"
Click the Back button to return the "Chapter 8. Editing...".
Now click Sync To TOC.

It works!


Seems like it only doesn't work when I'm on the first entry in the TOC of a series of nested duplicates.

So, syncToc works:
Editing Features ->  Nope
Notifications -> YES
Feature Notifications -> YES
Notification Tool Window YES