Thomas
> This doesnt make it any better it makes it even WORSE ... because using bad code as a Example which you want to present to many people us much worse than using PUBL VAR in a app only youself work on ...The function of this code was not to show how to write good code, it was to demonstrate, in 75 minutes, how an incredibly complex set of data management classes can be made to work.
As I said the code you refer to was used to set an environmental variable that I could use to override (for the purposes of the demo only) the normal behavior of these classes.
The alternative was to re-write the much of the 3500+ lines of code in DataClass.prg, and the 1275+ lines in DSetBase.prg that constitute the core of the Data Classes. So I chose, to use a crude and dirty technique that I would NEVER use in production and used a Public Variable to assist me in demonstrating the MUCH more important point of how the data classes work.
I also, in that session (and in the white paper), made it very clear that the code used in the conference was DEMO code only and that if anyone wanted the production version of the code they should contact me and I would send them the current production version.
If this offends you, I am sorry, but
I did not, and do not, offer THAT code as an example of how to write good code - once again this is something that you picked out of session material that is not, and never was, intended for production use.
Whenever you find something in my production code to criticize, please feel free to tell me about it (plenty of other people have, and I have made plenty of changes because of their input) but oddly enough, I don't worry about, or update, demonstration stuff - always providing that it does what it has to do - as this code did!
Regards
Andy Kramek
Microsoft MVP (Visual FoxPro)
Tightline Computers Inc, Akron Ohio, USA