Page 4 of 4
Lost another big piece of code
Posted: Fri Oct 15, 2021 11:46 am
by leighproman
Tried it again the other way around and yes it deleted the DocumentCompleted method and replaced with the blank DocumentNavigated method.
So sequence was:
Open the code-behind prg
Comment out the lines in the event method
Save the changes
Leave the code page open
Open the form
Click the browser control and go to event properties page
Delete the event name next to DocumentCompleted
Double-click on event for DocumentNavigated
VS puts me back on the code-behind page with an empty DocumentNavigated method and no DocumentCompleted method.
- formcode.jpg (96.18 KiB) Viewed 434 times
Lost another big piece of code
Posted: Fri Oct 15, 2021 2:34 pm
by ic2
Hello Leigh,
Apart from the fact that this is a serious issue (and apparently difficult to reproduce to make it worse...) I still wonder how you can separate the written code from the generated code? E.g. if I would double click on a button the click event will be created somewhere in a random line in the .prg with the generated code, right?
Does it mean you keep deleting this code and pasting it in your written prg?
But it's "good" to know Kees is not the only one having seen this issue.
Dick
Lost another big piece of code
Posted: Fri Oct 15, 2021 2:44 pm
by leighproman
The newly generated event code is always added to the end of the generated code (as you can see in the screenshots)
I usually just cut and paste it to another prg containing a partial class of the same window.
Once there it doesn't get touched if I modify the window.
The window in the example has so little code I hadn't bothered separating it out.
Leigh
Lost another big piece of code
Posted: Fri Oct 15, 2021 3:37 pm
by Chris
Hi Leigh,
Thanks a lot for the very detailed report! Those steps indeed reproduce the problem, and the critical step needed is to have the design mode file closed and reopened after the code is written in the .prg, or have it closed already before doing that. In my case I had the design mode always open side by side, and that prevents the problem from happening. I will pass this for Robert for fixing, hopefully this will take care of all related issues.
.
Lost another big piece of code
Posted: Fri Oct 15, 2021 6:46 pm
by ic2
Hello Leigh, Chris,
Good news that you found it and most certainly can fix it (I hope before you release 2.9)!
And I thought already that separating code in Visual Studio required this manual work. Working with VS requires many workarounds to keep it working, well, working...more or less..
Dick
Lost another big piece of code
Posted: Sat Oct 16, 2021 7:24 am
by robert
Dick,
We have found this and fixed it.
The 2.9 build is now being tested further (internally) before it is released. I think we can release it in a few days.
Robert
Lost another big piece of code
Posted: Mon Oct 18, 2021 10:53 am
by ic2
Hello Robert,
robert wrote:We have found this and fixed it.
The 2.9 build is now being tested further (internally) before it is released. I think we can release it in a few days.
That is very good news!
Dick