[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: NSApplication openFiles
From: |
Riccardo Mottola |
Subject: |
Re: NSApplication openFiles |
Date: |
Tue, 07 Aug 2012 12:27:27 +0200 |
User-agent: |
Mozilla/5.0 (X11; FreeBSD i386; rv:14.0) Gecko/20120802 Firefox/14.0.1 SeaMonkey/2.11 |
Hi,
Fred Kiefer wrote:
GNUstep has these methods mainly on the class GSServicesManager. This
is somethign that I always wondered about. It would feel more natural
to me to have these methods on NSApplication, and have
GSServicesManager call that implementation. We could then dispatch the
calls in NSApplication either to the delegate or to the corresponding
methods on NSDocumentController, if the delegate wont handle them.
Adding "application:openFiles:"would be very simple then.
For your specific requirement even with the current code it would be
simple to add that method and all you would have to do then is
implement it on the application delegate.
That is what I did, I attach a preliminary patch that shows where I am
heading to. It works: for N files the delegate gets called, else with a
single file it works as before. Fine.
However, previously if N files were passed, openFile was called iteratively.
I think this behaviour should be preserved if ther eis no delegate for
openFiles, what do you think? But how? The chekds are done in the
GSServiceManager, but there this method returns (void) so in
NSApplication I don't know to handle the fallback. Inside NSApplication
how can I check if the delegate implements the openFiles method?
Riccardo
openFiles-1.patch
Description: Text document
- 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 <=
- 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, 2012/08/07
- Re: NSApplication openFiles, Riccardo Mottola, 2012/08/07