Re: cocoa and argv
Re: cocoa and argv
- Subject: Re: cocoa and argv
- From: Ondra Cada <email@hidden>
- Date: Thu, 15 Aug 2002 14:56:30 +0200
On Thursday, August 15, 2002, at 01:13 , Georg Tuparev wrote:
I think you can access command-line arguments using NSUserDefaults
NSArgumentDomain... from the NSUserDefaults documentation:
Too complicated.
Matter of factly, in case for the particular tool args of pattern "-Name
value" are sufficient, exploiting NSUserDefaults seems to me to be the
most plain and most handy solution. No domains needed, just access the
user defaults with the appropriate name. The fact that the values can be
also stored into the defaults database is just an added benefit one might
and need not use.
NSArry *myArgs = [[NSProcessInfo processInfo] arguments];
will return you the list of arguments as you are used form main(argc,argv)
...
whilst of course no arguing that this is the most flexible solution.
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.cz
private email@hidden
http://www.ocs.cz/oc
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.