Re: Retrieving application name during runtime
Re: Retrieving application name during runtime
- Subject: Re: Retrieving application name during runtime
- From: Ken Ferry <email@hidden>
- Date: Fri, 10 Dec 2004 21:56:34 -0500
On Fri, 10 Dec 2004 20:56:12 +0800, Peter <email@hidden> wrote:
> 3) Is it possible to retrieve command line arguments via Cocoa ?
Arguments of the form "-MyKey MyValue" are set as defaults in the
running app [1]. For example, if the app is started like this,
myapp -MyKey MyValue
then
[[NSUserDefaults standardUserDefaults] objectForKey:@"MyKey"]
retrieves @"MyValue".
I don't know if there's a way to get command line arguments that
aren't of that form.
-Ken
[1]: Documented at
<http://developer.apple.com/documentation/Cocoa/Conceptual/UserDefaults/Concepts/DefaultsDomains.html#//apple_ref/doc/uid/20000718/96930>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden