Problem with DirectFileSave

kol.dmit

Member
Hi.
At first, I am sorry for my bad English.
At second, I want to ask an advice about my problem.
I write plug-in and need to create some menus and redefine
 
The File > Save As will save the file with the "filesystem" it was opened with. So if you have user the RegisterFileSystem function to return a name, and a file was opened correct, the save function should call your DirectFileSave.
 
Thanks a lot.
And if I have to save, for example, view from database. And view was not saved to file yet. Programmer just press "Ctrl+s" and view will saved to a specified path (in plug-in settings) without any dialog. Can I use DirectFileSave for this task? Or I need to use some other way?
 
In your example, the save function will use the normal save because the "file" was not opened with your filesystem. You have to add a specific "Save file as" menu. If you open a file with your Plug-In, the application will know this, and File > Save will call your DirectFileSave function.

It's just as with the FTP Plug-In, this adds the following two menu's:

FTP File Open...
FTP File Save...

and in addition, if a file was opened with FTP File Open, the normal save function will save it through FTP as well.
 
Back
Top