On 2014-02-12 14:32:26 -0600 Fred Kiefer <fredkie...@gmx.de> wrote: [...] > > Now I am completely confused. From inspecting the code I would say that > this method must get called. > > The whole process of saving a file should start from > -_runSavePanelForSaveOperation: in NSDocument. This calls > -runModalSavePanel:withAccessoryView: and there we either call > -runModalForDirectory:file: or -runModal on the save panel. The later > method calls the former, which means we must end up there. > I just tested that with the standard NSSavePanel and it worked as > expected. (Apart from freezing my machine as I had a breakpoint in a > method called from a menu action. I really need to remove the > _captureMouse: calls you placed in NSMenuView years ago :-) > > The only method that doesn't end there is -beginSheetForDirectory:... in > WinNSSavePanel, maybe you are taking that code path? In that case you > should move your breakpoint to > -runModalForDirectory:file:types:relativeToWindow: > Anyway, the filetypes you get passed into this methods should be the > result of -allowedFileTypes. You really should use that value. > > Fred
Yes, my breakpoint was wrong. But using fileTypes don't solve the problem. If you see at line 1198 at NSDocument.m, are passed the extensions for the document type, not all extensions. I think this is correct, because we are saving an specific type of document. The accessory view provides a way to change the type, but this don't exist at Windows. See at line 1215 in NSSavePanel.m, we use the first extension in _allowedFileTypes. So, if we pass all extensions (from all types), we can't be sure that first extension correspond to the current document. Germán. _______________________________________________ Gnustep-dev mailing list Gnustep-dev@gnu.org https://lists.gnu.org/mailman/listinfo/gnustep-dev