Re: Quit-RelaunchFinder ( anErr = -600 procNotFound )
Re: Quit-RelaunchFinder ( anErr = -600 procNotFound )
- Subject: Re: Quit-RelaunchFinder ( anErr = -600 procNotFound )
- From: Francis Derive <email@hidden>
- Date: Wed, 16 May 2007 17:24:44 +0200
John,
Ok, see you on Carbon list - (whilst Cocoa-Carbon Inc. ).
For your information, when I quit this app, then quit every apps,
when it comes to the last app to be quitted..., Finder comes out to
being from nothingness ! Would you believe - it helps :).
Cheers,
Francis
On May 16, 2007, at 4:48 PM, John Stiles wrote:
You can't send an appleevent to a process that doesn't exist.
Check MacErrors.h for descriptions of errors like "procNotFound".
Also, this is not a Cocoa question in any way. Try the Carbon list.
Francis Derive wrote:
Hello all!
I have a little app which start by quitting Finder ( thanks to
Sample demonstrating quitting Finder at
http://developer.apple.com/technotes/tn2002/downloads/tn2062_2.hqx )
and I want it, at some point of the app, to re-launch Finder ( It
helps :) ).
For this I have copy/pasted the code for QuitFinder() and thought
it would be clever enough to change the constant
kAEQuitApplication to the constant kAEOpenApplication.
This doesn't work.
Before I learn enough about these "AE" things, could anyone help ?
Francis
PS : I get anErr = -600 (procNotFound) in the debugger.
OSErr LaunchFinder() {
[...]
//Building the Apple event
anErr = AEBuildAppleEvent( kCoreEventClass,
kAEOpenApplication,
typeApplSignature,
&kFinderProcessSignature,
sizeof(OSType),
kAutoGenerateReturnID,
kAnyTransactionID,
&tAppleEvent,
&tAEBuildError,
"");
if (noErr == anErr)
{
// Send the event.
anErr = AESend( &tAppleEvent, &tReply, kAENoReply |
kAEAlwaysInteract, kAENormalPriority, kNoTimeOut, nil,
nil );
// always dispose of AEDescs when you are finished with them
(void) AEDisposeDesc(&tAppleEvent);
}
return anErr;
}
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
40blizzard.com
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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