[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Methods +readable/writableTypes
From: |
Germán Arias |
Subject: |
Re: Methods +readable/writableTypes |
Date: |
Wed, 12 Feb 2014 23:00:37 -0600 |
User-agent: |
GNUMail (Version 1.2.1) |
On 2014-02-12 14:32:26 -0600 Fred Kiefer <address@hidden> 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.
- Re: Methods +readable/writableTypes, (continued)
- Re: Methods +readable/writableTypes, Wolfgang Lux, 2014/02/07
- Re: Methods +readable/writableTypes, Germán Arias, 2014/02/08
- Re: Methods +readable/writableTypes, Germán Arias, 2014/02/08
- Re: Methods +readable/writableTypes, Fred Kiefer, 2014/02/10
- Re: Methods +readable/writableTypes, Germán Arias, 2014/02/11
- Re: Methods +readable/writableTypes, Fred Kiefer, 2014/02/11
- Re: Methods +readable/writableTypes, Germán Arias, 2014/02/11
- Re: Methods +readable/writableTypes, Fred Kiefer, 2014/02/11
- Re: Methods +readable/writableTypes, Germán Arias, 2014/02/12
- Re: Methods +readable/writableTypes, Fred Kiefer, 2014/02/12
- Re: Methods +readable/writableTypes,
Germán Arias <=
- Re: Methods +readable/writableTypes, Fred Kiefer, 2014/02/15
- Re: Methods +readable/writableTypes, Germán Arias, 2014/02/17
- Re: Methods +readable/writableTypes, Germán Arias, 2014/02/24
- Re: Methods +readable/writableTypes, Doug Simons, 2014/02/25
- Re: Methods +readable/writableTypes, Germán Arias, 2014/02/26
- Re: Methods +readable/writableTypes, Doug Simons, 2014/02/25
- Re: Methods +readable/writableTypes, Germán Arias, 2014/02/26