discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSApplication openFiles


From: Fred Kiefer
Subject: Re: NSApplication openFiles
Date: Fri, 03 Aug 2012 00:10:15 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120713 Thunderbird/14.0

On 02.08.2012 17:27, Riccardo Mottola wrote:
Hi,

Riccardo Mottola wrote:

I think we are missing the delegate method "application:openFiles:" of
NSApplication, available since 10.3

What I want is be able to handle an application launched with two files:

myApp.app file1 file2

How was this handled before in 10.2 and openstep? I'm curious.

I think I can add the method in the NSApplication quite easily by
copying the openFile: and wrapping the arguments in an Array. What do
you think?

Actually I have noticed that we don't have these methods in
NSApplication, but in NSDocumentController.

I want to implement this delegate method in my own application, but I
don't get the notification at all and I am wondering where it should be
launched.

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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]