( from "Event binding And loose coupling : https://docs.microsoft.com/en-us/previous-versions/visualstudio/FoxPro/ms965450(v%3dmsdn.10) " ) Define Class datacommands As Container … Procedure bindevents *!* Instead of button's click() calling a *!* method in the parent container. Simply *!* use the edit button's own event to trigger *!* the parent to some action. Bindevent(This.btnedit,"InteractiveChange",; THIS,"SetEdit",2) Bindevent(This.btnedit,"ProgrammaticChange",; THIS,"SetEdit",2) Bindevent(This.btnundo,"Click",This,"Undo",2) Bindevent(This.btnsave,"Click",This,"Save",2) Endprocmaybe thats' why we don't use bindevents as much as we 'd like to.
With bindeventsFor( This ) .btnedit.interactiveChange = "setEdit, 2" .btnedit.programmaticChange = "setEdit, 2" .btnundo = "Undo" .btnsave = "Save" EndwithVFP can be new again!