Re: why I got wrong arguments from command-line
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