Quit-RelaunchFinder ( anErr = -600 procNotFound )
Quit-RelaunchFinder ( anErr = -600 procNotFound )
- Subject: Quit-RelaunchFinder ( anErr = -600 procNotFound )
- From: Francis Derive <email@hidden>
- Date: Wed, 16 May 2007 10:59:16 +0200
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:
This email sent to email@hidden