Welcome, Guest
Username: Password: Remember me
CodeTyphon MS Windows (Win7, Win8.x, Win10 and Win11) OS Development, discussions and problems
  • Page:
  • 1

TOPIC:

destroyed source code 5 years 7 months ago #13430

  • Jens
  • Jens's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 7
  • Thank you received: 0
Windows 10 Pro, CT 6.8 BigIDE 64bit

Several times, also in previous CT versions, I noticed a destroyed source code by CT from time to time. Since the last version (6.8) it happens more often. Inbetween I figured out how to repeat the problem with some easy steps.

1. Settings. I activated the "wipe empty methods". I don't know how this is named exactly in the english version, but the picture (german) shows what i ment.





2. Start with an empty project, throw 2 buttons on the form, select Button1 and double click the OnClick event in the object manager. Now you have the Button1Click method in the source. Type a comment line in the method, to prevent autmatic delete because the setting above.







3. Select Button2 in the form, but instead of creating a new method, just choose Button1OnClick as method for the Button2 OnClick event. So far so good, everything fine so far.





4. Select Button1 in the form and create a OnMouseDown event in the same way like before, including the comment.









5. Now it is getting interesting. Select Button2 in the form, in the object manager select Button1MouseDown for the OnMouseDown event. Check source code. The Button1MouseDown method exists twice.







If you have hundreds or thousands of lines of code, you cannot see on the screen what happened, ususally you just continue writing code. The bomb will hit you later. Because the setting in #1 (within the next "file save" or compile) the empty method is away, but sadly including the declaration. Sometimes, the empty method is surviving, but already implemented stuff is deleted. I lost some hundred lines of code in a unit with about 2500 lines of code summary. I could not find out how to repeat to show it here.

The button was just an example, it works with other components too. In larger projects it ist possible to get dozens of double created empty methods with just one small change in the object manager. After saving or compiling, the most of the declarations are gone, the components on the form lose their event methods and so on. Time to start again from the last backup, if you have.

I tried all this above on several machines, icluding fresh installed ones. Same result always. I tried also older versions back to 6.5. All of them behave in the same way, but it feels like version 6.8 improved the trouble a bit. CT 6.4 did not show this behavior and it is the newest version of CT I can stable work with. Sadly it is not downloadable anymore on the website.

I searched a bit in the forum here, but couldn't find a thread about this. So, maybe I'm doing something wrong?
Thanks for reading thru this stuff!

Jens
Attachments:

Please Log in or Create an account to join the conversation.

destroyed source code 5 years 7 months ago #13431

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4540
  • Thank you received: 1117
Thanks Sir
We try to find the problem in IDE CodeTools
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

  • Page:
  • 1