Recent

Author Topic: Context Sensitive Help, Linux Forms Designer  (Read 5741 times)

dbannon

  • Hero Member
  • *****
  • Posts: 2796
    • tomboy-ng, a rewrite of the classic Tomboy
Context Sensitive Help, Linux Forms Designer
« on: February 05, 2017, 03:33:56 am »
Folks, I have just installed Lazarus 1.6 via the Ubuntu Repo ('cos its easy) but dont seem to be able to get the context sensitive help feature working. I'd like to know if it should work, in which case I should keep trying (maybe with a bit of help) or plan something else.

I have tried installing the (Ubuntu) Lazarus Doc Package - that just seemed to make heaps of directories in /usr/share/doc containing little more than copyright notices.

I manually installed the chm files and did get them working when looking at source but not the form designer.

I installed docview and the inf files, same result as chm, nothing when using the form designer. So I made a dummy entry under external apps that tells me that $curToken() does not retrieve (eg) an LCL name when in designer mode, seems to return what ever was last used under source editor. I guess its doing the same when dealing with chm viewer.

docview itself seems to work OK,   "docview lcl -k TButton" will search lcl and find the TButton entry. However, the only lcl.inf I could find is over six years old and seems more like a template waiting for its content.

Sigh, lots of implied questions there I'm afraid, thoughts ?

David
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

Graeme

  • Hero Member
  • *****
  • Posts: 1428
    • Graeme on the web
Re: Context Sensitive Help, Linux Forms Designer
« Reply #1 on: February 05, 2017, 06:09:26 pm »
docview itself seems to work OK,   "docview lcl -k TButton" will search lcl and find the TButton entry. However, the only lcl.inf I could find is over six years old and seems more like a template waiting for its content.
Indeed, the lcl.inf file is rather old, and new "actual help contents" has improved much since then. I'll make sure I build a new lcl.inf this week and make it available on SourceForge.
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

dbannon

  • Hero Member
  • *****
  • Posts: 2796
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Context Sensitive Help, Linux Forms Designer
« Reply #2 on: February 06, 2017, 12:19:53 am »
Thanks Graeme, that would be cool. Do you sync it against the chm files ?

Any thoughts about "Does Lazarus supply the right identifier when the CurToken() macro is called" ?

I my case, it does not, an external app, such as docview, does not get told the name of infocus control.

David

Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

Graeme

  • Hero Member
  • *****
  • Posts: 1428
    • Graeme on the web
Re: Context Sensitive Help, Linux Forms Designer
« Reply #3 on: February 06, 2017, 04:11:14 pm »
Thanks Graeme, that would be cool. Do you sync it against the chm files ?
I generate them directly from the documentation *.xml files found in the Lazarus code repository.

Quote
Any thoughts about "Does Lazarus supply the right identifier when the CurToken() macro is called" ?
I my case, it does not, an external app, such as docview, does not get told the name of infocus control.
I think you best bet is to ask in the Lazarus mailing list. There are more active core members there. ie: Mattias and friends. They will be able to tell you for sure.
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

dbannon

  • Hero Member
  • *****
  • Posts: 2796
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Context Sensitive Help, Linux Forms Designer
« Reply #4 on: February 07, 2017, 12:25:43 am »
Docs
"I generate them directly from the documentation *.xml files found in the Lazarus code repository."

Ah, xml ?  I was going to suggest I could contribute a bit with the docs, have a long history of writing documentation. But xml is no fun to work with I'm afraid. I know it makes sense but ....

Last time I used Delphi, over 16 years ago, the thing that impressed me was the great docs, particularly the little code snippets that really made you so productive.

Anyway, thanks for your time Graeme, its really great what you guys have done here.

David
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11452
  • FPC developer.
Re: Context Sensitive Help, Linux Forms Designer
« Reply #5 on: February 07, 2017, 02:39:12 am »
The last CHM files (for FPC 3.0.2RC1 with LCL) are from december.+/- last christmas and are, as always here.

I also generated FPC 3.0.2 final files today, but I haven't generated LCL ones for them yet.

As for designer mode afaik they are for the codeeditor only. Maybe they do work in lfm edit mode (alt-F12). But for details indeed better ask on maillist.

Graeme

  • Hero Member
  • *****
  • Posts: 1428
    • Graeme on the web
Re: Context Sensitive Help, Linux Forms Designer
« Reply #6 on: February 07, 2017, 12:53:07 pm »
Docs
"I generate them directly from the documentation *.xml files found in the Lazarus code repository."

Ah, xml ?  I was going to suggest I could contribute a bit with the docs, have a long history of writing documentation. But xml is no fun to work with I'm afraid. I know it makes sense but ....
Have no fear. ;) The fpdoc XML format is very simple, and there are a few options you to use to write documentation.

  • Lazarus IDE includes a documentation editor that hides all the XML. It integrates with the source editor window.
    http://wiki.lazarus.freepascal.org/New_IDE_features_since#Integrated_Documentation_Editor
  • Use code templates. In my text editor of choice (you can use Lazarus IDE for this too), create a couple of code templates. If I want to add a new topic, I double click the code template and simply fill in the actual help text. No need to bother with the XML tags.
  • I believe there are some other XML front-ends available too, thus making in somewhat easier to work with XML files.
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

dbannon

  • Hero Member
  • *****
  • Posts: 2796
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Context Sensitive Help, Linux Forms Designer
« Reply #7 on: February 08, 2017, 11:26:13 pm »
"Lazarus IDE includes a documentation editor that hides all the XML. It integrates with the source editor window.
http://wiki.lazarus.freepascal.org/New_IDE_features_since#Integrated_Documentation_Editor"

OK, thats interesting. The Integrated Doc Ed does not work in my installation either. The window pops up but content is not present. Looks like I'd better build a setup from source before doing anything else.

I'll wait for those resyncs to the doc files and decide if I can make some contributions if there is, as I suspect, still some missing content. Wiki could do with a bit of a refresh too....

David
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11452
  • FPC developer.
Re: Context Sensitive Help, Linux Forms Designer
« Reply #8 on: February 08, 2017, 11:39:16 pm »
I'll wait for those resyncs to the doc files and decide if I can make some contributions if there is, as I suspect, still some missing content. Wiki could do with a bit of a refresh too....

The wiki is editable for logged-in users. As far as the documentation goes, make sure you have current sources.

The FPC 3.0.2 buildprocess is in progress, and a release build triggers a flurry of doc updates

That said, anything sufficient quality posted to the bugtracker (loosely defined as whatever saves the regulary docbuilder's time) will usually be applied. Post the updates as in a differential (diff) format though.
« Last Edit: February 08, 2017, 11:42:02 pm by marcov »

dbannon

  • Hero Member
  • *****
  • Posts: 2796
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Context Sensitive Help, Linux Forms Designer
« Reply #9 on: February 09, 2017, 11:47:34 pm »
OK, this should just about close this thread off.

I built from source but did not install. I found that FPDoc Editor worked fine just launching from the startlazarus script. The chm viewer did not, I needed to set its path to the newly built files and it too was fine.

However, calling for help when in form design mode still does not work, be that looking for chm viewer or some outside ap. So I will pursue that on another sub group.

Thanks for advice about tricking up the docs, yep, had a good read of the LazDE, all makes good sense. That for you interest Graeme and Marcov.
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

 

TinyPortal © 2005-2018