Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select Commandbuttom with caption
Message
From
23/09/2005 12:23:45
 
 
To
23/09/2005 12:03:36
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 6 SP3
OS:
Windows '98
Network:
Windows 98
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01052280
Message ID:
01052432
Views:
12
I think you are saying that it would be better practice to move all the code from button.click() into a custom form method and have both the button and the timer call that method.

That is exactly right.

If so, I don't doubt your assertion, but I also don't see any practical difference. Could you explain what makes this better coding practice?

From a maintenance stand-point, if you have other people working on your code, if you all follow the convention that all methods go on the outermost container, you do not have to waste time hunting around all the objects on the form to find where the code is.

Seeing a line of code that says Thisform.DoValidationRoutine is more self-documenting that Thisform.command1.click().

What happens if you change the name of the command button or for some reason remove it later? All your code breaks.
Previous
Reply
Map
View

Click here to load this message in the networking platform