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: Launching Application with arguments



Yves,

>>>>>> Yves Peneveyre (YP) wrote at Mon, 19 Nov 2001 15:27:45 +0100:
YP> Now, I'd like to retrieve the arguments in the launched application.
YP> Ok, I can modifiy the "main(...)" function to get the arguments,
YP> but I'd like to know if there is an other way to do this......

I guess there would be other ways, but I somehow got used to use arguments
of general pattern "-<name> <value>".

Such arguments can be read anywhere using the NSUserDefaults API.

You can get the args directly through NSProcessInfo's arguments method, but
I consider the above to be *much* more flexible and convenient.
---
Ondra Cada
OCSoftware: email@hidden http://www.ocs.cz
2K Development: email@hidden http://www.2kdevelopment.cz
private email@hidden http://www.ocs.cz/oc


References: 
 >Launching Application with arguments (From: "Yves Peneveyre" <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.