RE: Can we get command line arguments in applicationShouldHandleReopen?

2011-07-11 Thread Hirendra Rathor
OK, I will use apple events for this. Thanks Hirendra From: Jens Alfke [mailto:j...@mooseyard.com] Sent: Friday, July 08, 2011 9:28 PM To: Hirendra Rathor Cc: cocoa-dev@lists.apple.com Subject: Re: Can we get command line arguments in applicationShouldHandleReopen? On Jul 8, 2011, at 7:13 AM

Re: Can we get command line arguments in applicationShouldHandleReopen?

2011-07-08 Thread Jens Alfke
On Jul 8, 2011, at 7:13 AM, Hirendra Rathor wrote: > I have written an .app which is launched many times until the running > instance shuts down finally. The code > to start it looks like this: > >NSTask* task = [[NSTask alloc] init]; >[task setLaunchPath: @"/usr/bin/open"]; That’s pre

Re: Can we get command line arguments in applicationShouldHandleReopen?

2011-07-08 Thread Shawn Erickson
On Fri, Jul 8, 2011 at 7:13 AM, Hirendra Rathor wrote: > The idea is to launch the application with different arguments so that it can > do different > stuff every time. That isn't going to work. If the application is always running it cannot be relaunched with new command line parameters. Also

Can we get command line arguments in applicationShouldHandleReopen?

2011-07-08 Thread Hirendra Rathor
I have written an .app which is launched many times until the running instance shuts down finally. The code to start it looks like this: NSTask* task = [[NSTask alloc] init]; [task setLaunchPath: @"/usr/bin/open"]; NSString* app = [NSString stringWithFormat:@"%s", launchApp]; // launc