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 are serious about meeting the needs of your (MacOSX) users, I would suggest the following:

if you are compiling on MacOSX, have a custom version of main() that checks a preference and then calls the "real" main with the additional argument.

That way, your MacOSX users can trigger your custom mode of your app by setting a preference, rather than mucking with the Info.plist of your application [which they may or (hopefully) may not have access to edit.


On Sep 22, 2005, at 7:31 AM, Jay Vaughan wrote:

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.



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