Re: [Lazarus] Help system questions
On 13/09/2014 07:00, Reinier Olislagers wrote: I'm working on fixing some things in the help system. 2. My patch in http://bugs.freepascal.org/view.php?id=26079 seems to work ok: for context-sensitive lhelp is started, hidden, loads .chm files and then is shown once the files are loaded. Then it shows the help for the requested item. Just implemented a fix for this that works for me on FPC trunk x86, Lazarus trunk, Windows. Menu Help/Help should also show help contents (after starting up lhelp). Would appreciate people on other platforms to test and tell me if it doesn't work. Thanks. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Help system questions
Excellent, is this likely to get into 1.26? Richard On 19 September 2014 12:42, Reinier Olislagers reinierolislag...@gmail.com wrote: On 13/09/2014 07:00, Reinier Olislagers wrote: I'm working on fixing some things in the help system. 2. My patch in http://bugs.freepascal.org/view.php?id=26079 seems to work ok: for context-sensitive lhelp is started, hidden, loads .chm files and then is shown once the files are loaded. Then it shows the help for the requested item. Just implemented a fix for this that works for me on FPC trunk x86, Lazarus trunk, Windows. Menu Help/Help should also show help contents (after starting up lhelp). Would appreciate people on other platforms to test and tell me if it doesn't work. Thanks. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Help system questions
On 19/09/2014 14:34, Richard Mace wrote: Excellent, is this likely to get into 1.26? Richard On 19 September 2014 12:42, Reinier Olislagers reinierolislag...@gmail.com mailto:reinierolislag...@gmail.com wrote: On 13/09/2014 07:00, Reinier Olislagers wrote: I'm working on fixing some things in the help system. 2. My patch in http://bugs.freepascal.org/view.php?id=26079 seems to work ok: for context-sensitive lhelp is started, hidden, loads .chm files and then is shown once the files are loaded. Then it shows the help for the requested item. Just implemented a fix for this that works for me on FPC trunk x86, Lazarus trunk, Windows. Menu Help/Help should also show help contents (after starting up lhelp). Would appreciate people on other platforms to test and tell me if it doesn't work. Thanks. Please don't top-post when others bottom-post, thanks. I would first like to see this tested out well across a range of machines as the lhelp simpleIPC code seems to be timing-sensitive, so no, I don't think so. Thanks. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Help system questions
On 13-09-2014 07:00, Reinier Olislagers wrote: 1. function TChmHelpViewer.ShowNode(Node: THelpNode; var ErrMsg: string ): TShowHelpResult; in components\chmhelp\packages\idehelp\lazchmhelp.pas has if Pos('file://', Node.URL) = 1 then begin Result := PassTheBuck(Node, ErrMsg); Exit; end; Is ignoring the results of the PassTheBuck (nice name ;) ) call on purpose or should it be changed to Exit(Result)? Just above Exit the Result of the function is already set in Result so there is no need for the parameter in Exit (it's already set). (Even the ErrMsg is given back via the var-parameter of ShowNode) (You were probably really tired :)) -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Help system questions
On 14/09/2014 12:46, Rik van Kekem wrote: On 13-09-2014 07:00, Reinier Olislagers wrote: Just above Exit the Result of the function is already set in Result so there is no need for the parameter in Exit (it's already set). (Even the ErrMsg is given back via the var-parameter of ShowNode) (You were probably really tired :)) Thanks, yes, you're right. Not surprisingly, fiddling with the code did not change my main problem: the Code Browser still pops up even after succesfully showing help but enabling the lazarus log did show this: TIDEHelpManager.ShowHelpForSourcePosition no declaration found, trying keywords ... TChmHelpViewer.ShowNode Filename=ref.chm SearchPath=D:\Docs\Pascal\LazarusHelp Found=D:\Docs\Pascal\LazarusHelp\ref.chm LHelpControl: WaitForMsgResponse: hit timeout (10) TIDEHelpManager.ShowHelpForSourcePosition not is not a FPC keyword, search via code browser ... which gives me something to work with (after a good night's sleep :) ): I get a timeout message which shouldn't happen so either a response is still not received in time (too early or too late) or not sent at all. Actually the main reason why I started this patch ;) Ah well... -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Help system questions
On 13/09/2014 07:00, Reinier Olislagers wrote: However, after a couple of seconds (which suggests a timeout error in the IPC communication) the IDE starts the Code Browser, looking for the identifier. Posting for reference: After a good night's sleep, some logging found this probable location: ide\idehelpmanager.pas function TIDEHelpManager.ShowHelpForSourcePosition(const Filename: string; const CodePos: TPoint; var ErrMsg: string): TShowHelpResult; which tries to show context-sensitive help, and on failure shows the code browser -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Help system questions
Hi list (and Laz devs), I'm working on fixing some things in the help system. 1. function TChmHelpViewer.ShowNode(Node: THelpNode; var ErrMsg: string ): TShowHelpResult; in components\chmhelp\packages\idehelp\lazchmhelp.pas has if Pos('file://', Node.URL) = 1 then begin Result := PassTheBuck(Node, ErrMsg); Exit; end; Is ignoring the results of the PassTheBuck (nice name ;) ) call on purpose or should it be changed to Exit(Result)? 2. My patch in http://bugs.freepascal.org/view.php?id=26079 seems to work ok: for context-sensitive lhelp is started, hidden, loads .chm files and then is shown once the files are loaded. Then it shows the help for the requested item. However, after a couple of seconds (which suggests a timeout error in the IPC communication) the IDE starts the Code Browser, looking for the identifier. Getting a bit tired, so perhaps somebody can tell me where the fallback to showing the code browser is coded... Thanks, Reinier -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus