Recent

Author Topic: Why Does LAZ Keep Adding Blank Procedures??  (Read 9964 times)

mas steindorff

  • Hero Member
  • *****
  • Posts: 532
Re: Why Does LAZ Keep Adding Blank Procedures??
« Reply #45 on: August 20, 2019, 01:45:08 am »
I got this - functions started duplicating. I fixed it by shutting down Lazarus and restarting, issue went away. No idea why it started happening.
same for me.  I've used Lazarus for many years, and have started to see this error only since my upgrade to 2.0.0.  I also have not found what triggers it but I "feel"  it has something to do with the class completion settings. it started a few days after I set "insert method implementations" -> last.  the project that triggers it is large and I'm not allowed to make it pubic so I'm playing around on some other projects to try and reproduce the bug.
one point, The project compiles (clean & build) just fine before the bug bites.  it is when I add a method via the object editor that causes the reintroduction of 4 to 8 procedures.

is 2.0.0 already too old to help track this bug?
windows 10 &11, Ubuntu 21+ - fpc 3.0.4, IDE 2.0 general releases

jamie

  • Hero Member
  • *****
  • Posts: 6090
Re: Why Does LAZ Keep Adding Blank Procedures??
« Reply #46 on: August 20, 2019, 03:32:18 am »
Does the class within the source file contain  message handlers methods ?
The only true wisdom is knowing you know nothing

mas steindorff

  • Hero Member
  • *****
  • Posts: 532
Re: Why Does LAZ Keep Adding Blank Procedures??
« Reply #47 on: August 20, 2019, 04:21:19 am »
if OnClick methods are message handlers, then Yes, the new procedures being added match the class (form) and names to a T.  all I've needed to do to fix the error is to delete the new procedures with a block highlight and hit the delete key.  I don't do anything in the top of the unit where the procedures are declared.  otherwise I'm not using and other messaging object in that form.
windows 10 &11, Ubuntu 21+ - fpc 3.0.4, IDE 2.0 general releases

mas steindorff

  • Hero Member
  • *****
  • Posts: 532
Re: Why Does LAZ Keep Adding Blank Procedures??
« Reply #48 on: January 24, 2020, 07:10:08 am »
This bug has spread  to several computers  and co-workers.   Any one have a fix?
windows 10 &11, Ubuntu 21+ - fpc 3.0.4, IDE 2.0 general releases

jamie

  • Hero Member
  • *****
  • Posts: 6090
Re: Why Does LAZ Keep Adding Blank Procedures??
« Reply #49 on: January 24, 2020, 10:43:50 pm »
No, Message handlers are those you add that receives and acts an a specific message you define..

For example..

   Procedure AmesageHandler(Var Msg :TMessage); Message LM_USER+?;

etc
 My point is I have a couple of apps that have those in it and I have found the IDE to misbehave
on that issue... It might be something else in the app doing it but that is all I can come up with at the moment..

 Just set your IDE options to remove unused methods.
The only true wisdom is knowing you know nothing

Mr.Madguy

  • Hero Member
  • *****
  • Posts: 844
Re: Why Does LAZ Keep Adding Blank Procedures??
« Reply #50 on: January 25, 2020, 08:00:58 am »
Thing, I like about Lazarus and miss in Delphi: it warns me about unused unit in uses.
Thing, I like about Delphi and miss in Lazarus: it automatically deletes all empty events.
Is it healthy for project not to have regular stable releases?
Just for fun: Code::Blocks, GCC 13 and DOS - is it possible?

HeavyUser

  • Sr. Member
  • ****
  • Posts: 397
Re: Why Does LAZ Keep Adding Blank Procedures??
« Reply #51 on: January 25, 2020, 09:16:23 am »
Thing, I like about Delphi and miss in Lazarus: it automatically deletes all empty events.
Not enabled by default but present in lazarus see attached options screenshot

mas steindorff

  • Hero Member
  • *****
  • Posts: 532
Re: Why Does LAZ Keep Adding Blank Procedures??
« Reply #52 on: January 26, 2020, 01:29:46 am »
No, Message handlers are those you add that receives and acts an a specific message you define..
...
   Procedure AmesageHandler(Var Msg :TMessage); Message LM_USER+?;
yes, I have created "message handlers" in several of the units I have written.  I use them as call back functions.
I'll give this a try to see if it fixes the Lazarus IDE
Thanks
windows 10 &11, Ubuntu 21+ - fpc 3.0.4, IDE 2.0 general releases

 

TinyPortal © 2005-2018