Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. articles. downloads. faq. members. files. rss.
 From: Ken Murphy
  Where is Ken Murphy?
 Springhill
 Canada
 Ken Murphy
 To: Andy Kramek
  Where is Andy Kramek?
 Hot Springs Village
 Arkansas - United States
 Andy Kramek
Subject: RE: create object programatically
Thread ID: 99991 Message ID: 100239 # Views: 2 # Ratings: 0
Version: Visual FoxPro 9 Category: General VFP Topics
Date: Saturday, July 1, 2006 1:56:31 PM         
   



> Hi Bernard
>
> Too true. There is no substitute for bad design. Using Search & Replace as a backup for bad design is an excuse not a methodology. It's a bandaid where the adhesive is gong to wear out at some time and fall off!
>
> Absolutely! I well remember a case where someone did exactly what Sergey proposed doing on a whole project that was written using only PRG files (an old FP2.6 application that was being re-written).
>
> They needed to remove a drive letter that had been hard-coded in a number of places. So they did a search on "D:" and replaced it with an empty string. This worked without error and the application re-compiled and ran just fine, accessing the correct drive, until someone noticed that the login screen now said:
>
> "Please Enter Your Passwor"
>
> and then a report was printed with headings like "Total Entere" and "Amount Accumulate" and there were hundreds of other instances of missing "d:" in text strings all over the place.
>
> The idiot (who was actually the IT Director) had not thought about the issue of partial matching or case sensitivity (though of course he should really have replaced "D:\" with "\" anyway). It took the developers DAYS to find and fix all of the occurrences (because he hadn't backed anything up either of course) and so a "10-minute fix" ended up taking several man-days of effort and cost the company a small fortune in lost time and effort.
>
> The problem with global search and replace is that it really IS global and unless you are 100% certain that only the things you want replaced will be (and how do you know that?) it is extremely dangerous.
>
> Even using options like "whole words only" and "match case" can still cause things you do not want touched to be replaced. Unless, of course, you use manual inspection to ensure that only the correct ones are affected and that defeats the whole object of doing it anyway!
>
> Regards
> Andy Kramek
> Microsoft MVP (Visual FoxPro)
> Tightline Computers Inc, Akron Ohio, USA


I ran into a situation like the one you describe. In this case though, the programmer had actually written a program that opened the .prg files using FOPEN() and scanned through each line of code applying logic to determine which changes to make. Believe it or not, this program was written entirely in FPD type coding but on a VFP 7 platform (no, it wasn't a legacy program it was new.) Unfortunately, his logic was not very good and his program never worked again - no backups either. I was called in to write the app visually. Can you imagine - writing a program to help you change your program????

Ya know. I think they call it Visual FoxPro for a reason.

Ken
You shall know the truth - and the truth shall set you free. (John 8:33)

ENTIRE THREAD

create object programatically Posted by Ryan Lashway @ 6/29/2006 2:34:16 AM
RE: create object programatically Posted by mike castillo @ 6/29/2006 6:40:23 AM
RE: create object programatically Posted by Andy Kramek @ 6/29/2006 12:59:19 PM
RE: create object programatically Posted by Bernard Bout @ 6/30/2006 5:28:07 AM
RE: create object programatically Posted by Marcia Akins @ 6/29/2006 1:16:50 PM
RE: create object programatically Posted by Ryan Lashway @ 6/29/2006 2:37:30 PM
RE: create object programatically Posted by Boudewijn Lutgerink @ 6/29/2006 4:13:23 PM
RE: create object programatically Posted by Ryan Lashway @ 6/29/2006 4:34:31 PM
RE: create object programatically Posted by Martin Sellwood @ 6/29/2006 4:58:31 PM
RE: create object programatically Posted by Andy Kramek @ 6/29/2006 7:15:50 PM
RE: create object programatically Posted by Dexter Carlit @ 6/29/2006 7:29:37 PM
RE: create object programatically Posted by Ken Murphy @ 6/30/2006 2:00:32 PM
RE: create object programatically Posted by Ravi Taxali @ 6/29/2006 4:50:39 PM
RE: create object programatically Posted by Martin Sellwood @ 6/29/2006 5:01:04 PM
RE: create object programatically Posted by Andy Kramek @ 6/29/2006 7:23:58 PM
RE: create object programatically Posted by Marcia Akins @ 6/29/2006 8:13:16 PM
RE: create object programatically Posted by Sergey Karimov @ 6/30/2006 1:23:37 AM
RE: create object programatically Posted by Boudewijn Lutgerink @ 6/30/2006 11:44:38 AM
RE: create object programatically Posted by Sergey Karimov @ 6/30/2006 4:22:38 PM
RE: create object programatically Posted by Boudewijn Lutgerink @ 7/6/2006 8:36:54 AM
RE: create object programatically Posted by Sergey Karimov @ 7/6/2006 5:15:06 PM
RE: create object programatically Posted by Bernard Bout @ 7/1/2006 2:56:54 AM
RE: create object programatically Posted by Andy Kramek @ 6/30/2006 12:54:08 PM
RE: create object programatically Posted by Sergey Karimov @ 6/30/2006 4:38:28 PM
RE: create object programatically Posted by Andy Kramek @ 6/30/2006 7:00:51 PM
RE: create object programatically Posted by Bernard Bout @ 7/1/2006 3:04:40 AM
RE: create object programatically Posted by Andy Kramek @ 7/1/2006 1:16:01 PM
RE: create object programatically Posted by Ken Murphy @ 7/1/2006 1:56:31 PM
RE: create object programatically Posted by Andy Kramek @ 7/1/2006 3:45:04 PM
RE: create object programatically Posted by Ken Murphy @ 7/1/2006 6:17:21 PM
RE: create object programatically Posted by Ravi Taxali @ 6/30/2006 3:34:45 PM
RE: create object programatically Posted by Ken Murphy @ 6/30/2006 5:12:54 PM
RE: create object programatically Posted by Ken Murphy @ 6/29/2006 1:23:06 PM
RE: create object programatically Posted by Gianni Sassanelli @ 6/29/2006 9:06:17 PM
RE: create object programatically Posted by Boudewijn Lutgerink @ 6/30/2006 11:48:48 AM
RE: create object programatically Posted by Borislav Borissov @ 6/29/2006 1:40:19 PM
RE: create object programatically Posted by Pete Sass @ 7/11/2006 4:13:37 PM
RE: create object programatically Posted by Dexter Carlit @ 7/12/2006 1:45:42 PM