Open a file that’s already opened in the editor


In versions prior to VFP7, if you open a file in the VFP editor, you couldn’t do anything else with the file in another process. For example, you couldn’t switch to another process like Windows Explorer and copy it or open it with notepad.


 


For VFP7 I changed this behavior so that the VFP editor opens the file with FILE_SHARE_READ rather than EXCLUSIVE use.


 


Little changes like this can make a product a lot more useable.


 

Comments (3)

  1. RyanNerd says:

    Hi Calvin,

    This was a nice change to the evolution of VFP. It was very frustrating sometimes not to have external access to a file the VFP had "locked down". Thanks for adding it.

  2. Calvin,

    Thanks indeed for this and countless other enhancements to our beloved Visual FoxPro.

    We look forward to future improvements!

    Kenneth Tamayo

    San Juan, Puerto Rico – USA

  3. Rick Strahl says:

    Calvin,

    I didn’t even realize that this was the case <g>…

    But, what would be even more useful if the editor could detect a change to the file and notify you like the VS.NET Editor. Then you could actually use the VFP editor in a shared environment.

    My scenario is for my new Web Connection Web Form edit interface. In this scenario I’m VS.NET and use an Add-in to bring up the VFP and the Editor with the source file and I can edit it and save. But if I leave the file open and the file is externally modified (by a code generator in this case) I don’t know about it, so the editor now shows outdated data. Worse, even if I exit the editor with ESC, the file is reverted back to the original content, not the content that was in the meantime saved to disk.

    A file change notification would solve this issue nicely…