I'm working on the HTML editing features for wxMozilla and for my application and SaveDocument only works properly when a data path for external files is specified. However, in some cases (my application included), that behavior is harmful because I want to have, say, an "images" subdirectory that contains only images, etc. I want to save just the HTML file itself, and let my application manage the paths to external files.

I've tried calling SaveDocument with the dataPath being nsnull, but this doesn't work properly - it works fine the first time I save, but subsequent attempts to save the document fail. I need to actually destroy the browser window and recreate it before I can save again. In the photon embedding example, there's a comment that explains what sounds to be exactly my problem:

/* we have to provide a directory, otherwise the current SaveDocument is marked as not finished and the next one is aborted */

Is it possible to change this behavior so that when the data path is nsnull, the SaveDocument operation completes when the page itself is saved? I checked in the nsIWebBrowserPersist.cpp source but had a hard time finding where exactly the save operation is failing.

Thanks,

Kevin

Reply via email to