[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: NSApplication openFiles
From: |
Wolfgang Lux |
Subject: |
Re: NSApplication openFiles |
Date: |
Tue, 7 Aug 2012 16:26:38 +0200 |
Riccardo Mottola wrote:
Wolfgang Lux wrote:
>> Riccardo Mottola wrote:
>>
>>> Hi,
>>>
>>> Wolfgang Lux wrote:
>>>> I think it would be a better idea to always perform
>>>> [_listener application: self openFiles: files];
>>>> in NSApplication (even if there is only one file).
>>>>
>>>> In GSServicesManager you could then use this code (beware I didn' test
>>>> this):
>>> I liked your suggestion. i refined it to handle the special case of "1"
>>> file only too. It appears to work fine, I will commit it later!
>> What is the point of a special case? If the delegate implements
>> -application:openFiles: you should call it even if only one file is
>> supplied. Note that a (modern) delegate might only implement
>> -application:openFiles: but not -application:openFile: and your special case
>> (at least as far as I understand) would break such programs.
> Current apple documentation says nothing about using "openFiles" instead of
> "openFile". Furthermore they state "Tells the delegate to open multiple
> files.". Multiple for me means > 1. So, at least, it is confusing and by
> reading the spec I would understand to implement both methods and expect the
> latter do be called only by more files. This is why I had implemented the
> special case last week, out of the documentation. But of course only a test
> will do.
From the 10.3 AppKit release notes:
If the application delegate implements application:openFiles:, this method
will be called instead of application:openFile:. Similarly,
application:printFiles: will be called instead of application:printFile:.
Wolfgang
- NSApplication openFiles, Riccardo Mottola, 2012/08/02
- Re: NSApplication openFiles, Wolfgang Lux, 2012/08/02
- Re: NSApplication openFiles, Riccardo Mottola, 2012/08/02
- Re: NSApplication openFiles, Fred Kiefer, 2012/08/02
- Re: NSApplication openFiles, Riccardo Mottola, 2012/08/07
- Re: NSApplication openFiles, Wolfgang Lux, 2012/08/07
- Re: NSApplication openFiles, Riccardo Mottola, 2012/08/07
- Re: NSApplication openFiles, Wolfgang Lux, 2012/08/07
- Re: NSApplication openFiles, Riccardo Mottola, 2012/08/07
- Re: NSApplication openFiles, Riccardo Mottola, 2012/08/07
- Re: NSApplication openFiles,
Wolfgang Lux <=
- Re: NSApplication openFiles, Riccardo Mottola, 2012/08/07