• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: cocoa and argv
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.
  • Follow-Ups:
    • Re: cocoa and argv
      • From: Georg Tuparev <email@hidden>
References: 
 >cocoa and argv (From: Brian Ling <email@hidden>)

  • Prev by Date: Re: cocoa and argv
  • Next by Date: Re: cocoa and argv
  • Previous by thread: Re: cocoa and argv
  • Next by thread: Re: cocoa and argv
  • Index(es):
    • Date
    • Thread