View Single Post
Azhrei
Senior Member
 
Join Date: Sep 2015
Posts: 435

Old May 9th, 2019, 12:04 PM
It seems strange that such a change to the code would be a large architectural shift. I mean, surely the counters are represented with one or two data types within the code, and there are probably defined interfaces for modifying those data types. A change inside the data type that tells it to report (total-current) instead of (current) seems like a simple enough change. The "rest" functions would still set current to zero, but it would be reported as "50" (or whatever the total is) and the entire application stays the same.

Or maybe they don't (consistently) use those one or two data types that represent counters. Or maybe they break encapsulation and look at the data in the fields directly... (Even that is easy to fix — just change the name of the field and add a function to access it. Now the compiler will complain about every single location that used the field directly and a search-and-replace script can change them to function calls. A few hours with awk or perl or python should do it, and have the benefit of making the code more robust. It's a little trickier than this — I know because I've done this kind of thing — but it's not that tough.)

However, as pointed out by Minous, Hero Lab Classic is "already in the process of being replaced", so they'll never spend any time on it...
Azhrei is offline   #8 Reply With Quote