CLEAR MEMORY

Modify

This method belongs to the File object and lets you programmatically open a file from an open project for editing.

Usage

filFile.Modify( [ cClassName ] )
For most of the files in a project, opening the appropriate editor is as simple as calling this method. Modify can even open another application to let you edit its files. For example, if you have a BMP in the project, calling its Modify method opens PaintBrush (or whatever application you have associated with BMP files).

Things are a little more complicated for classes, though. The file that belongs to the project is the class library, not the class itself. So, to edit a particular class, you call the Modify method on the class library and pass the name of the class to be edited. If you omit the class name, the special Open dialog for class libraries comes up to let you choose a class.

When Modify is called, the QueryModifyFile project hook method fires first, if there is one, to determine whether or not Modify should actually proceed. If QueryModifyFile issues NODEFAULT, the Modify is aborted.

Example

* Go through a project and open all the programs for editing * Assume we have a reference to the project in oProj  FOR EACH oFile IN oProj.Files    IF oFile.Type = "P"       oFile.Modify()    ENDIF ENDFOR   * Open a particular class.  oProj.Files[3].Modify("frmBase")

See Also

Add, File, Files, Modify Class, Modify Command, Modify Database, Modify File, Modify Form, Modify Label, Modify Menu, Modify Project, Modify Query, Modify Report, Modify Structure, Name, Project, QueryModifyFile, Remove, Type Property


View Updates

Copyright © 2002 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. All Rights Reserved.



Hacker's Guide to Visual FoxPro 7. 0
Hackers Guide to Visual FoxPro 7.0
ISBN: 1930919220
EAN: 2147483647
Year: 2001
Pages: 899

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net