gnustep-dev
[Top][All Lists]
Advanced

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

Re: [Gnustep-cvs] r30407 - in /libs/gui/trunk: ChangeLog Source/NSAppli


From: Gregory Casamento
Subject: Re: [Gnustep-cvs] r30407 - in /libs/gui/trunk: ChangeLog Source/NSApplication.m
Date: Mon, 17 May 2010 14:35:03 -0400

"I believe this change does the wrong thing. If I understand correctly
what your code is trying to do, it loops over all the arguments to the
process, ignoring the ones that start with a "-", which most likely are
command switches, gathers them all up and then tries to open then."

That's not fully correct.  It iterates over the list of files until it
finds one which is an option.  It then stops gathering the list and
tries to open the files it found.

For instance:

SomeApp.app/SomeApp file1 -xxx file2

will open only file1, not file two.

"This sounds fine until you realize that GNUstep gui already had some
command line argument processing."

It still does..  I did realize this, of course.  My changes were
implemented in the same place.   I also tested -NSOpen, -GSFilePath
and -NSPrint prior to committing the change to make sure that they
still worked so I'm not sure why it's "not possible anymore."

"For example, we allow for files to get
printed and this wont be possible any more with your code.
The just open them all approach may improve things for people doing
simple things, but breaks stuff for everybody who knows about this
special features of GNUstep."

I researched this.    Currently both OpenStep and Mac OS X exhibit the
same behavior.

Currently on Mac OS X and on OpenStep the feature to open a file
directly from the command line exists using precisely the semantics
that I have implemented.   I have tested this on both OpenStep and on
Mac OS X.

Additionally, adding this missing feature has enabled opening files on
Windows via Exporer and GNOME via it's file viewer since both of them
assume that you can simply call the executable with it's file as an
argument.

Greg C.

P.S. I'm not sure what you're calling a special feature...
-GSFIlePath/NSOpen or what i just implemented.


On Mon, May 17, 2010 at 1:39 PM, Fred Kiefer <address@hidden> wrote:
> Am 17.05.2010 10:29, schrieb Gregory Casamento:
>> Author: gcasa
>> Date: Mon May 17 10:29:55 2010
>> New Revision: 30407
>>
>> URL: http://svn.gna.org/viewcvs/gnustep?rev=30407&view=rev
>> Log:
>>       * Source/NSApplication.m: Attempt to open files from the command
>>       line, if possible in -finishLaunching.  This matches the behavior
>>       seen on OpenStep and on Mac OS X/Cocoa.
>>
>> Modified:
>>     libs/gui/trunk/ChangeLog
>>     libs/gui/trunk/Source/NSApplication.m
>
> Hi Greg,
>
> I believe this change does the wrong thing. If I understand correctly
> what your code is trying to do, it loops over all the arguments to the
> process, ignoring the ones that start with a "-", which most likely are
> command switches, gathers them all up and then tries to open then.
>
> This sounds fine until you realize that GNUstep gui already had some
> command line argument processing. For example, we allow for files to get
> printed and this wont be possible any more with your code.
> The just open them all approach may improve things for people doing
> simple things, but breaks stuff for everybody who knows about this
> special features of GNUstep.
>
> Fred
>



-- 
Gregory Casamento - GNUstep Lead/Principal Consultant, OLC, Inc.
yahoo/skype: greg_casamento, aol: gjcasa
(240)274-9630 (Cell)



reply via email to

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