开发者

How to fix broken context sensitive help in IDE of Delphi 2010

开发者 https://www.devze.com 2023-02-03 03:41 出处:网络
After working for quite some time, my D2010 help system broke. Highlighting a keyword like TStringList and hitting F1 results in the

After working for quite some time, my D2010 help system broke.

Highlighting a keyword like TStringList and hitting F1 results in the message "No help found for context."

Putting the cursor in a property field (like ModalResult) in the property edi开发者_C百科tor and hitting F1 shows an hourglass and that's all.

Clicking on the IDE's main menu Help and then Delphi Help works. I can type TStringList into the search field (in the Microsoft Document Explorer that appears, loaded with "What's New - Embarcadero RAD Studio") and get appropriate results.

Anyone have any suggestions on how to fix this?


You can maybe make things better by rebuilding the help index files.

Open a command prompt, and navigate to your $(BDS)\Help\Doc folder. Run H2Reg -u to unregister the existing help topics, and then run H2Reg -r to re-register. THen launch help, and you should get the dialog that says it's indexing content.

If you want more info about H2Reg.exe, simply run it without parameters from the command line; it will display a dialog with details about the command line switches and what they do. You should also scan throuh H2Reg.ini, as it has comments on each section and what it does to affect things.

And, as an aside, the help in XE is vastly improved, although it still has a way to go.


I know 3 causes for this problem:

1 - For some reason, if you internet fails while rad studio is trying to load help the help crashes and you will need to close and reopen delphi.

2 - Antoher reason is that you can have a corrupted help (it happens when you install some fixes from microsoft as the windows 7 sp1 for example). The only way in this case is to reinstall the help (check it out Delphi).

3 - It happens sometimes when you hit F1 while delphi is trying to refresh the editor (so avoid it).

You also need to be sure you have all delphi's patches (the help patches correct a lot of issues).

But i will tell you: the delphi help system is really bad (not the help, but its integration with Delphi).


In Delphi XE i solved the problem using this approach:

  • Exit Delphi XE
  • Navigate to "Embarcadero\RAD Studio\8.0\Help\Doc" folder
  • Move the files rad.hxs, vcl.hxs and codeex.hxs to another folder (If dexplore.exe is running you may have to stop it)
  • Start Delphi XE and try F1 help again (For me it did not work yet)
  • Exit Delphi XE
  • Stop dexplore.exe if it is running
  • Copy the three files back to "Embarcadero\RAD Studio\8.0\Help\Doc"
  • Restart Delphi XE and try F1 help again (Now it should work as intended)


The following batch file works for me (without closing Delphi):

REM Kill running instances of Microsoft Document Explorer
taskkill /f /im dexplore.exe

REM Go to the Delphi Help Files folder
IF EXIST  "%programfiles%\Embarcadero\RAD Studio\8.0\Help\Doc" PUSHD "%programfiles%\Embarcadero\RAD Studio\8.0\Help\Doc"
IF EXIST  "%programfiles(x86)%\Embarcadero\RAD Studio\8.0\Help\Doc" PUSHD "%programfiles(x86)%\Embarcadero\RAD Studio\8.0\Help\Doc"

REM Unregister Delphi Help Files
h2reg.exe -u

REM Register Delphi Help Files
h2reg.exe -r


I experienced the same problem, but the H2Reg fix never worked for me. :( I tried running Delphi RAD Studio XE2 as Administrator, even though my user account was already set to Administrator, and tested F1 including the context help. Everything worked as expected :) Afterwards, I closed Delphi, switched off the Run as Administrator option, reopened Delphi, and the help worked perfectly. :)


The methods of using h2reg.exe did not work for my case (RAD Studio XE3). It costs me several hours to find out my solution. The root cause of my problem is the broken Microsoft Document Explorer 2008. I try to repair it from Control Panel -> Uninstall Application. Surely you can remove it and install it back from many source, including the help system of RAD studio.

Try this if other ways don't work.


Try reinstall Microsoft Document Explorer

0

精彩评论

暂无评论...
验证码 换一张
取 消