• 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: Command line parameters...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Command line parameters...


  • Subject: Re: Command line parameters...
  • From: Aaron Tuller <email@hidden>
  • Date: Mon, 22 Aug 2005 13:12:51 -0700

At 3:53 PM -0400 8/22/05, Jeff LaMarche wrote:
Okay... I'm trying to build an objective-C foundation tool, and I'm a little (okay, a lot) rusty on writing command line programs.

Do it the Cocoa way! Get your arguments like this:

NSArray *args = [[NSProcessInfo processInfo] arguments];

and get stdin like this:

NSFileHandle *fhin = [NSFileHandle fileHandleWithStandardInput];
[fhin availableData];

-aaron

_______________________________________________
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: 
 >Command line parameters... (From: Jeff LaMarche <email@hidden>)

  • Prev by Date: Re: Command line parameters...
  • Next by Date: Re: no mouseUp if mouseDown not overridden?
  • Previous by thread: Re: Command line parameters...
  • Next by thread: Re: Command line parameters...
  • Index(es):
    • Date
    • Thread