Recent

Author Topic: Where does one find what - missing documentation  (Read 5841 times)

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: Where does one find what - missing documentation
« Reply #15 on: January 25, 2020, 06:35:45 pm »
Ctrl+click or [F1], doesn't function, if uses does not list the unit.

You need to search in the help app in that case. See my second post with screenshot.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9792
  • Debugger - SynEdit - and more
    • wiki
Re: Where does one find what - missing documentation
« Reply #16 on: January 25, 2020, 06:38:50 pm »
Try installing Cody. The identifier dictionary is exactly what you need.

PascalDragon

  • Hero Member
  • *****
  • Posts: 5446
  • Compiler Developer
Re: Where does one find what - missing documentation
« Reply #17 on: January 25, 2020, 06:59:40 pm »
Oh, I didn't see the OP post was about Free Pascal. I saw TPanel and I thought Lazarus.

In Lazarus, even the uses clause isn't 'correct' as long as the component is available in the component tab, dropping one to the form will automatically add the related unit in the uses clause. ... Well, sometimes (but rarely) ... the dbf component always forgets to add db and db_fields in the uses clause.

The problem is if one instantiates a component only in code and not on the form. If you drop it on the form, then yes, the uses clause will usually be updated correctly. But in the other case you need to take care of that yourself.

Handoko

  • Hero Member
  • *****
  • Posts: 5131
  • My goal: build my own game engine using Lazarus
Re: Where does one find what - missing documentation
« Reply #18 on: January 25, 2020, 07:02:20 pm »
Ctrl+click or [F1], doesn't function, if uses does not list the unit.
It is useful that ctrl+click it opens the defining source (I didn't know this "trick") - but it is no use, to locating a unit.

I already mentioned, here again ... it will work if:

+ You're using Lazarus
+ The component is installed and available on the component tab
+ You drop the component to the form
+ only works on form's source code (not the pas file you manually created)

Yeah, it won't work on non-form pas file. But not a 'real' problem. I then will usually click the mainform (even if I write a new non-visual component, I usually will generate a test form for it) and drop the component so I can 'learn' which it belong to and the methods and the properties and much ...
Of course I can start a browser or using the CHM, but that's not so easier. FYI, CHM reader is not installed on Linux by default.
« Last Edit: January 25, 2020, 07:16:58 pm by Handoko »

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9792
  • Debugger - SynEdit - and more
    • wiki
Re: Where does one find what - missing documentation
« Reply #19 on: January 25, 2020, 07:20:34 pm »
See attached pic.

I am writing code in a new unit. The code is not even complete, not compile-able either. [1]

The unit is not yet added.

One key-press (I think default is alt-d, but you can change it to what you want)
=> dialog pops up.
=> I press "enter" or hit the "use identifier" button.

The unit will have been added to the uses, and I can continue writing code.


[1] It has to be parse/compile-able up to and including the "uses" clause. Otherwise codetools can't insert new units to the uses.
« Last Edit: January 25, 2020, 07:23:40 pm by Martin_fr »

Handoko

  • Hero Member
  • *****
  • Posts: 5131
  • My goal: build my own game engine using Lazarus
Re: Where does one find what - missing documentation
« Reply #20 on: January 25, 2020, 07:28:17 pm »
Great, it should be installed by default.
I'm happy with my old method. But it will be very handy for new users.

Maybe we can have a page:
Recommended tools and must learn tricks.
« Last Edit: January 25, 2020, 07:31:18 pm by Handoko »

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9792
  • Debugger - SynEdit - and more
    • wiki
Re: Where does one find what - missing documentation
« Reply #21 on: January 25, 2020, 07:36:40 pm »
Maybe we can have a page:
Recommended tools and must learn tricks.
Yet another one?
As for some more "neat tricks": https://wiki.lazarus.freepascal.org/Lazarus_IDE_Tools
Also https://wiki.lazarus.freepascal.org/New_IDE_features_since

At least the first one I highly recommand to read. Even if you have 10+years on Lazarus, chances are you will discover something you did not yet know.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9792
  • Debugger - SynEdit - and more
    • wiki
Re: Where does one find what - missing documentation
« Reply #22 on: January 25, 2020, 07:45:12 pm »
Or maybe... contribution required... on our homepage.

There is that "tip of the day" animated image (more a "random tip for every page load" )

It does not have many entries yet.
https://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/site/tips.txt?view=markup&revision=116&root=lazaruswebsite

Provide an entry for the above file, with an image (fitting the size avail on the page / check other images) and I can add it.

Ideas for other tips? Open a new thread and lets discuss them. => It be great to have more showcasing on our homepage.


marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: Where does one find what - missing documentation
« Reply #23 on: January 25, 2020, 08:24:43 pm »
e I can start a browser or using the CHM, but that's not so easier. FYI, CHM reader is not installed on Linux by default.

CHMhelp package and associated LHELP is pure Lazarus, so works on *nix too. Stronger even, the CHM parts I developed were mostly done on FreeBSD( and in later years linux)

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9792
  • Debugger - SynEdit - and more
    • wiki
Re: Where does one find what - missing documentation
« Reply #24 on: January 25, 2020, 08:57:23 pm »

Birger52

  • Sr. Member
  • ****
  • Posts: 309
Re: Where does one find what - missing documentation
« Reply #25 on: January 26, 2020, 01:33:42 pm »
Installed Cody.

Have this line (in new control)

    FDispList : TFPObjectList;

Clicking F! with the cursor on TFPObjectList I get an error popup: there is no help available for the file I'm working in.
Ctrl+Click or Alt+[up] gives a message: identifier not found: TFPObjectList

Help menu, swith to FCL Help - it's in contnrs.pp

Well - I knew. But was ancious to see Cody or codetools find and insert...
It's just not happening...
Lazarus 2.0.8 FPC 3.0.4
Win7 64bit
Playing and learning - strictly for my own pleasure.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9792
  • Debugger - SynEdit - and more
    • wiki
Re: Where does one find what - missing documentation
« Reply #26 on: January 26, 2020, 04:02:16 pm »
Installed Cody.

Clicking F! with the cursor on TFPObjectList I get an error popup: there is no help available for the file I'm working in.
Ctrl+Click or Alt+[up] gives a message: identifier not found: TFPObjectList

Cody does NOT affect F1 or ctrl-click.

Cody adds a new "show unit/identifier dictionary" in the Menu "Source".
And calling that will do the trick.
That is what my image shows, and that is what I use day by day.

Check the menu for the keycombo. Edit it if needed.
I am not sure, but I believe it defaults to Alt-D.

jcmontherock

  • Full Member
  • ***
  • Posts: 234
Re: Where does one find what - missing documentation
« Reply #27 on: January 26, 2020, 05:46:49 pm »
I installed Cody and try to reproduce the example given by Martin and I got the following: what did I wrong ?
Windows 11 UTF8-64 - Lazarus 3.2-64 - FPC 3.2.2

PaulRowntree

  • Full Member
  • ***
  • Posts: 132
    • Paul Rowntree
Re: Where does one find what - missing documentation
« Reply #28 on: January 26, 2020, 05:59:39 pm »
I am new to Cody too.  I saw the same empty dialog box for the default empty project.  When I loaded up a real project it fills the dialog box with useful information.
Paul Rowntree
- coding for instrument control, data acquisition & analysis, CNC systems

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9792
  • Debugger - SynEdit - and more
    • wiki
Re: Where does one find what - missing documentation
« Reply #29 on: January 26, 2020, 06:07:43 pm »
I notified the maintainer.
For me, even if I start a none GUI project, it will find TPanel.

 

TinyPortal © 2005-2018