PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → [WD20] previously working code doesn't any more
[WD20] previously working code doesn't any more
Iniciado por guest, 06,oct. 2016 20:56 - 3 respuestas
Publicado el 06,octubre 2016 - 20:56
Hello All

Over the last year I have noticed that code that previously worked fine sometimes stops working and I couldn't work out now until today.
The examples are very specific and are restricted to code in one window that references variables in a prior window.

e.g. I set a global variable in the current window to false, open another window and in that window I reset the variable in the first window by direct reference as window1.variable = true
The normal reason for doing this is that something I do in the second window requires the first window to redisplay or recalculate some data.

Yesterday a client lodged a support call for code running in this manner that was working fine and now throws an error 1020. The code works fine in my environment, both code and development.

Previous examples of this type of failure include cases where the variable in the calling window just did not accept the value assigned to them in another window or just crashed.

This time I had an inspiration and checked the patches I had sent to the client and the first window had been patched so I sent the client a patch that contained both windows and that fixed the problem.

My conclusion is that the compiler incorporates other window calls in a way that causes problems if one window changes.
I have used this coding methodology for many years and I can't recall it being an issue so maybe something has changed in the compiler process in V20 This is a big problem if you code in the manner that I do with other window references as I will now have to test for calls to other windows before issuing a patch.

Regards
Al
Publicado el 07,octubre 2016 - 07:49
Hi Al, yes, with WD21 I'm experiencing strange things too and cannot locate any reasons. Previously, a compiled WD program used to be rock solid, since v21 it looks like things went a different way.

1 - a customer reports a strange file access error with a new version of the program. (Supposedly, a memory zone is not read correctly, the following HReadSeek for the VAT% from the VAT-file fails) No changes whatsoever in this part of the program. However, the previous version works ok. Asked them to send their data which they did, but I cannot find / see / demonstrate any error with their data.

2 - Today, a customer says, she cannot open a simple Table+Table window, the program hangs. I cannot see any reason for not opening the window. Asked her to send data but I fear it will be like the other case - no error on my computers.
Publicado el 12,octubre 2016 - 06:42
Hello Al and Guenter,

In both these cases ask your clients to stop/pause/disable their antivirus application and then run your respective software. I guess this will solve the problem.
Publicado el 12,octubre 2016 - 07:13
Hi Yogi, in case 1 thought of that already - no joy. Case 2 has been solved, it really has been the data, not the program.