CheckIn, CheckOut, GetLatestVersion, UndoCheckOut
These methods allow you to move files in the Files collection into or out of your source code control provider.
Usage |
lResult = filFile.CheckIn() lResult = filFile.CheckOut() lResult = filFile.GetLatestVersion() lResult = filFile.UndoCheckOut() |
In our configuration, using Visual SourceSafe, each of these methods brings up confirmation dialogs, despite the fact that the Tools-Options-Projects check box that says "Display dialog box for shortcut menu commands" is unchecked. This ruins the entire point of manipulating these things programmatically, in our opinion. We hope Microsoft will look at this and consider a more developer-friendly interface. |
Example |
* Here's a routine to check out, modify a file and check in oProject = _VFP.ActiveProject oFile = oProject.Files[1] IF oFile.ReadOnly && the file must be checked in oFile.CheckOut() oFile.Modify() && make your changes oFile.CheckIn() ENDIF * Scan a project and get the latest version of all the files FOR EACH oFile in oProject.Files oFile.GetLatestVersion() NEXT |
See Also |