• 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: why I got wrong arguments from command-line
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: why I got wrong arguments from command-line


  • Subject: Re: why I got wrong arguments from command-line
  • From: Sean McBride <email@hidden>
  • Date: Wed, 30 Mar 2011 14:02:39 -0400
  • Organization: Rogue Research Inc.

On Tue, 29 Mar 2011 22:55:45 +0800, Haibin Liu said:

>1.double click to start my application (no additional command-line
>arguments).
>
>2.and start application from command-line with additional arguments.
>
>3.i got wrong arguments
>NSArray * argvs = [[NSProcessInfo processInfo] arguments];
>    argvs = (
>    "/Users/sara/studio/client/bin/Debug/Test.app/Contents/MacOS/Test",
>    "-psn_0_2392648"
>)
>"psn_0_2392648" is not expected.
>
>i will got perfect result without step 1.
>
>it make me confused.

FYI the psn is the Carbon Process Manager's 'process serial number',
similar to a UNIX pid.  See the docs for ProcessInformationCopyDictionary
() for example.

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >why I got wrong arguments from command-line (From: Haibin Liu <email@hidden>)

  • Prev by Date: Re: autorelease pool comprehension
  • Next by Date: Xcode 4.0 Application builds
  • Previous by thread: Re: why I got wrong arguments from command-line
  • Next by thread: Customize Views Created Within Interface Builder
  • Index(es):
    • Date
    • Thread