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?



"main(int argc, char *argv[]) is useless on mac"

BUZZ! If you want your users to have to fire up terminal, change their
directory to where your app lives and then type in a long complicated
command line to run your app then guess what? They can. There is absolutely
nothing in our operating system that prevents you from doing this. And we'll
parse all the command line arguments and pass them to your main. Just like
all those other operating systems. Knock yourself (and your users) out. ;-)
Is it user friendly? Nope, but that's a different question.

look, the thing is, you're missing the point.

i want to maintain compatability with my args list, which are used on other platforms, for compatabilities sake, to make it easy to support my already-argc/argv-savvy users, and not have to do things through some kinda plist editor unless i very much have to .. which its now clear i must .. but the reason i'm so into this arg thing is simply, i want, simply, to be able to say "add these args to your app: -dontcrash -getlost -havefun", and have it be a 'standard list of args' that either an OSX or Unix user can grok, over the phone, and run the app.

and guess what? thanks to the responses on this list, i've decided simply to just add a new key to my Info.plist file, called "CFBundleExecutableArgs", which is Apple-friendly, and will still be 'compatible' with my args parser without too much fuss, or stress. and i can just bend the minds of the OSX users, tell them to look for that key, and add the args they need. which will still be compatible with the Unix way of doing things.

it'd be 'nice', if somehow, there was already an accomodation for this in the Info.plist spec, to have a 'good old command line representation' available to Carbon apps/tools. thats all i'm trying to confirm/deny: does such a thing exist, if not, i'll have to add it.

psychological assessments of character aside, rants and raves about apple-itis aside, this just seems like an 'obvious' thing for a .plist .. after all, doesn't Apple want to support app ports from other environments as much as possible? and if i don't talk about it, maybe nobody will get the point ..


Meanwhile, for any non-"humor impaired": <http://www.dougdb.net/hammer.html>

yeah, great.

--

;

Jay Vaughan

_______________________________________________
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>)



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.