Re: Cocoa GUI app invocation from CLI with arguments

2008-03-31 Thread Chris Suter
On 01/04/2008, at 9:40 AM, Mac QA wrote: On 3/31/08, Jean-Daniel Dupas <[EMAIL PROTECTED]> wrote: You can get cli arguments at anytime using NSProcessInfo. - [[NSProcessInfo processInfo] arguments]; Awesome! This looks to be a much better method than parsing argv inside main before calling

Re: Cocoa GUI app invocation from CLI with arguments

2008-03-31 Thread Mac QA
On 3/31/08, Jean-Daniel Dupas <[EMAIL PROTECTED]> wrote: > > You can get cli arguments at anytime using NSProcessInfo. > > - [[NSProcessInfo processInfo] arguments]; Awesome! This looks to be a much better method than parsing argv inside main before calling NSApplicationMain, which is what I've

Re: Cocoa GUI app invocation from CLI with arguments

2008-03-31 Thread Jens Alfke
On 31 Mar '08, at 3:18 PM, Mac QA wrote: Can anyone suggest how, when invoked from the CLI, I can throw up my existing GUI and then fill in the values from the CLI into the corresponding fields of the GUI. You can get the command-line arguments as [[NSProcessInfo processInfo] arguments].

Re: Cocoa GUI app invocation from CLI with arguments

2008-03-31 Thread Jean-Daniel Dupas
You can get cli arguments at anytime using NSProcessInfo. - [[NSProcessInfo processInfo] arguments]; So just get them in -applicationDidFinishLaunching or in -awakeFromNib and do what you need with them. Le 1 avr. 08 à 00:18, Mac QA a écrit : Hi, In the past I have written a few little

Cocoa GUI app invocation from CLI with arguments

2008-03-31 Thread Mac QA
Hi, In the past I have written a few little Cocoa programs that when double-clicked are opened in GUI mode, or can also be invoked from the CLI by passing in a few arguments. In those situations when invoking from the CLI I never actually displayed a GUI, but just performed the same core functiona