Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2017-02

"Procedure list" level depth dependend?

6 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Jürgen Hestermann

In my program the "Procedure List" function (Ctrl+G) does not list functions that are subfunctions of other functions. Is there a restriction to show only functions of level depth 1? If yes, why?
I did not found any options influencing this.

Reply by email

Vojtěch Čihák

Hello,
I tested with Lazarus 1.7 r54239M FPC 3.0.2 x86_64-linux-qt and nested functions and procedures are listed well (I tested depth 3). The shortcut is Alt+G.  
V.

Reply by email

Jürgen Hestermann
to Vojtěch Čihák
Vojtěch Čihák wrote
I tested with Lazarus 1.7 r54239M FPC 3.0.2 x86_64-linux-qt and nested functions and procedures are listed well (I tested depth 3).

I am using the last official release of Lazarus (1.6.2) on Windows 8.1. It does not show deeper nested functions.

The shortcut is Alt+G.

Yes, you are right. It's Alt+G (not Ctrl+G).

Reply by email

Graeme Geldenhuys
to Jürgen Hestermann: In my program the "Procedure List" function (Ctrl+G) does not list functions that are…
Jürgen Hestermann wrote
Is there a restriction to show only functions of level depth 1? If yes, why? I did not found any options influencing this.

I tested with Lazarus v1.3 and Lazarus v1.7. I can confirm that older Lazarus versions seem to limit itself to only top-level (depth of 1) methods, functions and procedures. It does work correctly in v1.7 though.

I can also confirm that the original Procedure List implementation didn't use CodeTools internally - it had its own parser - and with that code it listed all methods/procedures/functions, no matter the nested depth. See attached screenshot.

So I guess somewhere when Procedure List was converted to using CodeTools, this bug got introduced. It was definitely not the intent.

Maybe a small patch can be applied to your Lazarus to resolve the issue locally. Maybe compare your version of Lazarus to the latest Procedure List in trunk and see what is done differently with CodeTools. I haven't looked at the Procedure List code in a very long time. If I have the time I'll try and take a look, but I'm extremely busy at the moment, so no guarantees.

Regards,
Graeme

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot01.png Type: image/png Size: 23694 bytes Desc: not available URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20170222/c93e82da/attachment-0001.png>

Reply by email