• 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: Pierre-Olivier Latour <email@hidden>
  • Date: Thu, 15 Aug 2002 12:13:22 +0200

> I seem to have a slight problem, I need to open a
> cocoa app from the command line, with an argument.
> When the app is open by:
> myapp.app/Contents/MacOS/myapp argument
>
> I can access argv from the main.m main function.
> The problem is how can I access argv from my
> Controller class?

Quick & dirty solution ;)
Use a global variable where you copy the args (maybe keeping only the
pointer is OK, I don't know enough about Unix to answer this one).


_____________________________________________________________

Pierre-Olivier Latour email@hidden
Lausanne, Switzerland http://www.pol-online.net
_______________________________________________
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.

References: 
 >cocoa and argv (From: Brian Ling <email@hidden>)

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