Recent

Author Topic: (Solved)Mysterious Feature of IDE  (Read 544 times)

JLWest

  • Hero Member
  • *****
  • Posts: 934
(Solved)Mysterious Feature of IDE
« on: March 10, 2020, 06:45:36 pm »
Maybe getting closer to figuring this out.
I have a program that is about 985 lines long and I wanted to make some major changes.

1. Added a button to the screen.
2. Double clicked on the button.

The IDE created all these empty procedures (Code Attached)

Notice the procedure header: "procedure TForm1.TrimeDownOperFile;"
I had just added this line and double clicked on the button.
 
« Last Edit: October 23, 2020, 01:23:20 am by JLWest »
FPC 3.2.0, Lazarus IDE v2.0.4
 Windows 10 Pro 32-GB
 Intel i7 770K CPU 4.2GHz 32702MB Ram
GeForce GTX 1080 Graphics - 8 Gig
4.1 TB

Handoko

  • Hero Member
  • *****
  • Posts: 3912
  • My goal: build my own game engine using Lazarus
Re: Mysterious Feature of IDE
« Reply #1 on: March 10, 2020, 07:02:17 pm »
That's called Code Complete. I changed the setting of mine, if I remember correctly the original shortcut combo is Ctrl+Shift+C.

You can see all the shortcuts of your IDE:
Lazarus main menu > Tools > Options > Editor > Key Mappings

Code complete will be called if you type the declaration of a procedure/function in the interface section and press the shortcut.

More IDE tricks can be found here:
https://wiki.freepascal.org/New_IDE_features_since
« Last Edit: March 10, 2020, 07:06:55 pm by Handoko »

winni

  • Hero Member
  • *****
  • Posts: 2005
Re: Mysterious Feature of IDE
« Reply #2 on: March 10, 2020, 07:05:16 pm »
Hi!

But as long as you got some errors in your code,
the code completion sometimes makes weird or
funny things.

First solve all compile errors - and then add a new button.

For me the compiler stops at line 83, because it can't find
UIMGR('1');

Winni

JLWest

  • Hero Member
  • *****
  • Posts: 934
Re: Mysterious Feature of IDE
« Reply #3 on: March 10, 2020, 09:46:44 pm »
AH, Well It's a feature I/m sure ay come in handy for some but now I have to delete all those empty procedures. Do they have a code uncompleted?
FPC 3.2.0, Lazarus IDE v2.0.4
 Windows 10 Pro 32-GB
 Intel i7 770K CPU 4.2GHz 32702MB Ram
GeForce GTX 1080 Graphics - 8 Gig
4.1 TB

winni

  • Hero Member
  • *****
  • Posts: 2005
Re: Mysterious Feature of IDE
« Reply #4 on: March 10, 2020, 09:56:46 pm »
Hi!

Activate

Tools --> Options --> Editor --> Completition and Hints --> "Auto remove empty methods"

While the next saving they are deleted

Winni

JLWest

  • Hero Member
  • *****
  • Posts: 934
Re: Mysterious Feature of IDE
« Reply #5 on: March 10, 2020, 10:48:55 pm »
Thanks -
FPC 3.2.0, Lazarus IDE v2.0.4
 Windows 10 Pro 32-GB
 Intel i7 770K CPU 4.2GHz 32702MB Ram
GeForce GTX 1080 Graphics - 8 Gig
4.1 TB

 

TinyPortal © 2005-2018