MODIFY FORM is my new favorite Foxpro command. Or is that MODIFY CLASS? It’s really neither. There is a parameter “METHOD” that is really what makes these commands my favorite. How could I get along without this for so long?!?
First off, some back story. I like to keep my methods short and concise. I feel that this allows for code re-use. In fact, I end up with too many methods sometimes, where I get confused. I end up documenting which methods call the method I’m editing just to help me keep them straight. Each approach has it’s drawbacks but I feel that keeping methods atomic is well worth it.
So, it’s a pain to be testing a class, where there are tons of methods, and the class gets closed in the IDE during the test, to get back to this method. Thus, “METHOD” is so helpful to me.
I can type in “MODIFY CLASS MyClass METHOD SuperDuperHelpfulMethod”, and Fox opens the class right to the method. This command is always available to me in the Command Window for easy access. I wasn’t originally sure if this would work with visual elements, but sure enough it does. ï¿½MODIFY FORM MyCoolForm METHOD pgfCool.Page2.List1.Refreshï¿½ gets me right where I want to be.
I’ve been doing Fox for a long time, and I’m still learning! I hope this helps someone as much as it’s helped me.