Sam
Sam

Reputation: 2683

Delphi 7 strange disappearance of FormCreate event handler in dfm

I'm using Tortoise SVN with Delphi 7 and I always have to check the dfm before I commit... but I have a Delphi 7 DFM which has somehow lost it's FormCreate and FormShow event handles! I know that moving the form inside the Delphi IDE causes the dfm to be modified (Top, Left.. etc), but I highly doubt that I removed the event handles manually... so I'm wondering if anyone has experienced anything like this before. Please share your experience. Thanks.

Upvotes: 0

Views: 483

Answers (3)

André
André

Reputation: 9112

It sometimes happens, but do not know why. Mostly when using frames or inherited forms, and opening/changing a subframe/subform without opening the forms that use it. Or something like that... Cannot reproduce it, but weird indeed.

Upvotes: 2

Chris Walton
Chris Walton

Reputation: 2533

I have experienced this when initially sketching out the method and event structure. If I generate event handles, then move on and compile or run the program with an empty event holder, then CodeComplete will remove the empty handler. I have not encountered this problem in situations where the event handler is non-empty.

Upvotes: 2

Cesar
Cesar

Reputation: 498

I have used Delphi for many years and it has never happened to me, but if the code is still there you could just double click on the event (FormCreate and FormShow) and they will be assigned again.

Upvotes: 2

Related Questions