[Rubycocoa-devel 442] Re: prepare_argv

Zurück zum Archiv-Index

Jonathan Paisley jp-ww****@dcs*****
Tue Nov 7 19:26:39 JST 2006


On Tue, 7 Nov 2006 10:22am +0100, Laurent Sansonetti wrote:

> Just a quick idea, what about filtering argv and keeping only flags (/
> ^-/)? In this way, if you give a filename to a RubyCocoa application,
> it would be ignored (and we could print a warning to notice the user).
> And you can still pass -d, which I find very useful.

The original motivation was to be able to pass a command-line argument 
that might be a file to the application. So, for example, I could do

     MyApp.app/Contents/MacOS/MyApp somefile

Stripping all non-options would obviously prevent that from working.

Normally I suppose you should use 'open -a MyApp.app somefile' and let the 
NSDocument framework give you the file to open. However, I could see that 
it could be useful in debugging or special runtime configuration.





More information about the Rubycocoa-devel mailing list
Zurück zum Archiv-Index