• 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: Access to argc & argv
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Access to argc & argv


  • Subject: Re: Access to argc & argv
  • From: John Stiles <email@hidden>
  • Date: Wed, 26 Oct 2005 11:40:56 -0700

Well, this might not be the best answer. But it's trivial to save them off in a global variable at the top of main().


On Oct 26, 2005, at 11:40 AM, George Lawrence Storm wrote:

Starting with a traditional Cocoa application in main() we pass argc & argv into NSApplicationMain()
i.e.: return NSApplicationMain(argc, (const char **) argv);


I need to gain access to argc & argv at a point later in my program.

I am unable to locate an acessor from NSApplication. Is there one I am missing?

Otherwise as I look back into the archives I see conflicting recommendations as as to if I should access them through NSUserDefaults or NSProcessInfo.

-----

George Lawrence Storm
Macintosh Applications Development
Edmonds (Seattle), Washington
E-mail: <email@hidden>

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40blizzard.com


This email sent to email@hidden


_______________________________________________ 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
References: 
 >Access to argc & argv (From: George Lawrence Storm <email@hidden>)

  • Prev by Date: Access to argc & argv
  • Next by Date: Re: Access to argc & argv
  • Previous by thread: Access to argc & argv
  • Next by thread: Re: Access to argc & argv
  • Index(es):
    • Date
    • Thread