Recent

Author Topic: F1 Help system requires compilable code  (Read 2501 times)

jack616

  • Sr. Member
  • ****
  • Posts: 268
F1 Help system requires compilable code
« on: May 27, 2016, 09:34:29 pm »
I don't know if this is how the help system is coded or if it's a bug (can't see anything in bugtracker)
but if you have code that does not compile and hit F1  (cursor on a keyword ) the help system
fails to run.

To see the effect take any project and just delete the "end" statement from any begin/end block
then try F1

I've tried a couple of projects and it does the same - can anyone duplicate this ?

PS I'm using IDE V1.6
« Last Edit: May 27, 2016, 09:36:01 pm by jack616 »

Graeme

  • Hero Member
  • *****
  • Posts: 1428
    • Graeme on the web
Re: F1 Help system requires compilable code
« Reply #1 on: May 28, 2016, 12:53:29 am »
I haven't tried to duplicate the issue, but I can see that it could happen. After all CodeTools (eg: code completion, parameter help etc) fails to work when code is not compilable either - very annoying.

I can't test your help issue locally, because I reassigned the F1 key in Lazarus IDE to my own help system, using fpGUI's Docview help viewer and the help files being in the INF file format. This is definitely not affected by code that can't compile - after all, if you can't remember the syntax for something, you would like to press F1 to get help on that topic. So having a broken help system at that point would be a double whammy.  :(

You are welcome to try DocView. It is set up via the IDE's External Tools functionality, so no need to install new packages and recompile your IDE.

  http://fpgui.sourceforge.net/docview_ide_integration.shtml

Pre-compiled binaries of DocView are available on SourceForge. INF help files for Free Pascal's RTL, FCL, Language Reference, as well as fpGUI and LCL API docs are also available from fpGUI's SourceForge page in the Files section.
« Last Edit: May 30, 2016, 05:32:23 pm by Graeme »
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

Leledumbo

  • Hero Member
  • *****
  • Posts: 8746
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: F1 Help system requires compilable code
« Reply #2 on: May 28, 2016, 10:14:52 am »
I don't know if this is how the help system is coded or if it's a bug (can't see anything in bugtracker)
but if you have code that does not compile and hit F1  (cursor on a keyword ) the help system
fails to run.

To see the effect take any project and just delete the "end" statement from any begin/end block
then try F1

I've tried a couple of projects and it does the same - can anyone duplicate this ?

PS I'm using IDE V1.6
It's by design I believe. Codetools is run against corresponding source before triggering the help viewer to get enough information for the highlighted symbol so the help viewer can show the exact identifier definition (remember that Pascal allows identifier overriding simply by reordering uses clause), therefore the underlying source must be parseable.

jack616

  • Sr. Member
  • ****
  • Posts: 268
Re: F1 Help system requires compilable code
« Reply #3 on: May 29, 2016, 01:42:58 pm »
Thanks lele...
I can applaud the effort to be so inclusive  but I think I'm with graeme on the current nature
of the method for the same reasons.
Perhaps if some sort of 2 stage lookup was not too complex to implement that could cover both bases.



Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9791
  • Debugger - SynEdit - and more
    • wiki
Re: F1 Help system requires compilable code
« Reply #4 on: May 29, 2016, 06:01:10 pm »
I suggest you put a feature request on the bugtracker.

I guess codetools determine if the keyword is in RTL, FCL, or LCL, so the correct help can be opened.

Interesting that an error AFTER the keyword, causes problems too. I thought (but may be wrong) that codetools only need to scan up to the position of the keyword.


 

TinyPortal © 2005-2018