Refactoring: VFP form calls external PRG, uses Publics for shared data

I’ve inherited another legacy VFP application and am updating a routine to use a new format required by my client’s customer. There is a VFP form that eventually calls a program to gather, format, and export relevant data. One of the first things I need to do is change the form and program so their code can be independently tested. Once that’s accomplished, I’ll change the routines to generate the new format.

The question is, as always with this common situation is whether to pull the code into a “blob” method in the form and change all variables to properties, or call the program from the form with parameters. I realized my usual inclination is to use the former because eventually I would be binding the form properties to properties on future business classes that I’d create down the road. It’s odd how I’ll suddenly think of a usual problem in a different light. This is a routine that’s run four times a year, the new format is needed soon, and the client wants to begin planning for a new application to replace this one. Visual FoxPro will probably not be the tool of choice, so there is no reason to build the Queen Mary when a dinghy will get us across the narrow inlet just fine.

Can you tell I’m prone to make everything into A Work Of Art? Maybe I’m changing after all.


Sorta Startup Menu

I use a laptop as my sole machine. I find it irksome to wait for programs to start when Windows starts up. For example, I may want to start up, grab a document, and then shut down immediately. And, I’m just a really impatient person.

Recently I moved all my start up programs into a subfolder in the Windows Startup folder. Now when the laptop boots, the folder opens, and I can pick the programs I want to start. It’s all about control, baby.

First, open the All Users Startup folder.

Open All Users Startup folder

Open All Users Startup folder

Second, create a new subfolder in the Startup folder (I just called mine Startup).

Create new subfolder

Create new subfolder

Third, move the shortcuts in the Startup folder into the new subfolder. That’s it. The next time you login, the folder with the short cuts will open on your desktop.