Re: Relaunching an application

2008-03-04 Thread Michael Ash
On Mon, Mar 3, 2008 at 9:27 PM, Joe Ranieri <[EMAIL PROTECTED]> wrote: > Maybe I'm missing something, but > > Instead of NSTask, why not use LSOpenApplication passing in > (kLSLaunchDefaults | kLSLaunchNewInstance | kLSLaunchDontAddToRecents) > for flags? Your main program will block until t

Re: Relaunching an application

2008-03-04 Thread Mattias Arrelid
On 3 mar 2008, at 20.43, Steven Degutis wrote: Perhaps a small application like relaunch.app could be imbedded into your relaunchable application, where all it pretty much does is serve as a buffer by relaunching your application reliably (through Cocoa methods) after your app calls it the same

Re: Relaunching an application

2008-03-03 Thread Joe Ranieri
Maybe I'm missing something, but Instead of NSTask, why not use LSOpenApplication passing in (kLSLaunchDefaults | kLSLaunchNewInstance | kLSLaunchDontAddToRecents) for flags? Your main program will block until the sub program has launched. Joe Ranieri Lead Magician, Alacatia Labs, Inc

Re: Relaunching an application

2008-03-03 Thread Steven Degutis
I've come up with an applucation design that works better than my previous suggestion of psuedo-polling launchedApplications. Rather, the relaunch application subscribes to NSWorkspace's notification center, and waits until it gaurantees that its owner-Application has terminated. If you want the en

Re: Relaunching an application

2008-03-03 Thread Michael Ash
On Mon, Mar 3, 2008 at 2:43 PM, Steven Degutis <[EMAIL PROTECTED]> wrote: > Perhaps a small application like relaunch.app could be imbedded into > your relaunchable application, where all it pretty much does is serve > as a buffer by relaunching your application reliably (through Cocoa > methods

Re: Relaunching an application

2008-03-03 Thread Steven Degutis
Perhaps a small application like relaunch.app could be imbedded into your relaunchable application, where all it pretty much does is serve as a buffer by relaunching your application reliably (through Cocoa methods) after your app calls it the same way you mentioned above. [[NSWorkspace sharedWork

Re: Relaunching an application

2008-03-03 Thread John Stiles
Mattias Arrelid wrote: On 3 mar 2008, at 18.14, Nir Soffer wrote: On Mar 3, 2008, at 18:24, Mattias Arrelid wrote: I have an application that I need to restart. Why do you want to do that? A scenario could be that the entire contents of the .app bundle has been replaced with new stuff (e

Re: Relaunching an application

2008-03-03 Thread Jean-Daniel Dupas
Le 3 mars 08 à 18:18, Mattias Arrelid a écrit : On 3 mar 2008, at 18.14, Nir Soffer wrote: On Mar 3, 2008, at 18:24, Mattias Arrelid wrote: I have an application that I need to restart. Why do you want to do that? A scenario could be that the entire contents of the .app bundle has been

Re: Relaunching an application

2008-03-03 Thread Mattias Arrelid
On 3 mar 2008, at 18.14, Nir Soffer wrote: On Mar 3, 2008, at 18:24, Mattias Arrelid wrote: I have an application that I need to restart. Why do you want to do that? A scenario could be that the entire contents of the .app bundle has been replaced with new stuff (e.g. the case with Spark

Re: Relaunching an application

2008-03-03 Thread Nir Soffer
On Mar 3, 2008, at 18:24, Mattias Arrelid wrote: I have an application that I need to restart. Why do you want to do that? An easy way to do this could be: [[NSWorkspace sharedWorkspace] launchApplication:executablePath]; [NSApp terminate:self]; The problem is that the above solution resu