Re: cocoa and argv
Re: cocoa and argv
- Subject: Re: cocoa and argv
- From: Angela Brett <email@hidden>
- Date: Thu, 15 Aug 2002 22:26:52 +1200
I can access argv from the main.m main function.
The problem is how can I access argv from my
Controller class?
I think you can access command-line arguments using NSUserDefaults
NSArgumentDomain... from the NSUserDefaults documentation:
+ (NSUserDefaults *)standardUserDefaults
Returns the shared defaults object. If it doesn't exist yet, it's
created with a search list containing
the names of the following domains, in this order:
NSArgumentDomain, consisting of defaults parsed from the
application's arguments
A domain identified by the application's bundle identifier
NSGlobalDomain, consisting of defaults meant to be seen by all applications
Separate domains for each of the user's preferred languages
NSRegistrationDomain, a set of temporary defaults whose values can
be set by the application
to ensure that searches will always be successful
--
Angela Brett
email@hidden
http://acronyms.co.nz/angela
_______________________________________________
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.