Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to pass cmd line arguments to my carbon app?




On Sep 22, 2005, at 2:27 PM, Jay Vaughan wrote:

it looks like it was -not- done on purpose, this Args key in the .plist, because Apple wanted to do away with all that.

I think it's more accurate to say that that the Finder offers no interface to set command-line arguments simply because we haven't perceived a need for it. If many of our customers came to us and requested this feature, we'd consider adding it.


what about all my other argc/argv apps? does the finder just plain not know how to talk to them, normally?

Not sure what you mean by an "argc/argv" app. If you mean an app that doesn't have a GUI and is strictly meant for use from a command line, then it so happens that if you double-click such a file in the Finder, the Finder (or actually LaunchServices, I suspect) will launch Terminal and invoke the app in a new Terminal session, where it will run.


take the case, for example, of the gargantuan swaths of code represented in the GNU sphere, the *bsd sphere, the scientific computing sphere, which now have to have 'wrapper apps' written for them just to stuff args into the .app bundle scheme which is wrapping our Darwin bins.

Often, these are meant to be run from the command line; and if run from the command line on Mac OS X, you can pass all the arguments you want. If meant to be run from a graphics shell, I'd expect these apps to have some internal means of setting preferences, rather than via command-line args.


i'm simply trying to find out if there -is- a simple argc/argv path that can be followed, minimally, using Carbon/on Darwin

Basically, the only answer is, run your app from Terminal, or create a command-line script that runs your app and passes the appropriate args. There is no graphical means to set command-line arguments.


-eric

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden
References: 
 >Re: How to pass cmd line arguments to my carbon app? (From: George Warner <email@hidden>)
 >Re: How to pass cmd line arguments to my carbon app? (From: Jay Vaughan <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.