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?




If you intend to provide some args built into your end-user app, why
are they arguments? Anything cooked in to your Info.plist might as
well be hardcoded into main().


because i have an app which might be used as a production app, or also used as a test/debug app for a specific application i'm working on. i do not want to have to do tricky builds/different versions for this, nor have to force my users to edit the info.plist to turn options on; i simply want to give them two copies of the app, with main(int argc, argv) style switches for each case.


If you intend to edit the Info.plist to communicate information to
your app, why don't you just use the API that reads your bundle's
plist to get that information, rather than trying to get it in
argc/argv?

because i don't want to have to enslave my app to Apples proprietary dreck for this particular problem .. i *want* to use argc/argv to turn these switches on and off. if the answer is that Apple doesn't care, there is no way to pass switches to an app, then i would humbly ask why the hell i can do this with XCode, but not with the final app bundle ..


argc/argv is the API for command-line tools.  It is not part of the
Mac OS X user model for users to provide parameters when
double-clicking applications.

well, if thats the answer, thats the answer .. but i beg to differ that argc/argv is an "API for cmd-line tools". it is standard C, and I am using standard C with the Carbon API's to get my [cross-platform] app working under OSX, but its not the only run environment in the universe on which my code must play...


if argc/argv is borked in Apple-land, fair enough: that provides my answer. i will have no choice but to bow to the wisdom of such a thing .. but please forgive my stubbornness, when XCode itself supports such things, and the bundle spec doesn't ..

--

;

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: Jay Vaughan <email@hidden>)
 >Re: How to pass cmd line arguments to my carbon app? (From: Chris Espinosa <email@hidden>)
 >Re: How to pass cmd line arguments to my carbon app? (From: Jay Vaughan <email@hidden>)
 >Re: How to pass cmd line arguments to my carbon app? (From: Eric Schlegel <email@hidden>)
 >Re: How to pass cmd line arguments to my carbon app? (From: Chris Espinosa <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.