> Absolutely agree with those guys about maintenance. I don’t use any visual tools as well. And I'm adding another sentence – using .prg gives you a real flexibility. In fact I don’t understand how to create visually e.g. Order Entry form, when 80% of data is the same for all customers, but 20% is absolutely different. In .prg file you can do it easily.
> Or another little sample – lets assume you use txtPhone objects of class TextboxPhone in 40 forms. Now you decided instead of txtPhone to use cntPhone - a container with txtPhone and btnPhone to dial up. It means you must open in your wizard all 40 forms and manually do changes and adjust all objects. But with .prg files you just run Filer utility and do replace command 'TextboxPhone' --> 'ContainerPhone', 'txtPhone' --> 'cntPhone' and then '.cntPhone' --> '.cntPhone.txtPhone' That’s it! Belive me it will take less then 10 minutes. This is, if you will pardon my bluntness, total nonsense! There are a lot of beginners who read this forum and you should not be making statements like this - it is not only bad practice, it is very poor technique and, quite simply, wrong!
Your example is not only stupid, it is positively dangerous, anyone that uses FILER to make global changes to code like this is simply asking for trouble! One really good way to propagate un-traceable bugs throughout your code is to follow your recommendation.
The correct way to handle this is to use a visual container class in the first place, then, when you need to change it, you simply change ONE class definition and all instances of that class inherit the change. Even if you had added the objects to forms directly and then need to change them, you can still do it programmatically even easier than you can in a PRG - it requires exactly 4 lines of code and NO additional tools:
USE xxxx.scx
REPLACE class WITH newclass FOR
USE IN xxxx
COMPILE FORM xxxx
May I suggest that if you insist on parading your shortcomings that you do it somewhere a little less public.
Regards
Andy Kramek
Microsoft MVP (Visual FoxPro)
Tightline Computers Inc, Akron Ohio, USA