LaunchApplication woes
LaunchApplication woes
- Subject: LaunchApplication woes
- From: Dave Hersey <email@hidden>
- Date: Thu, 27 Nov 2003 00:18:07 -0500
Hi,
I'm using 10.2.8 and I'm trying to launch one Cocoa application from
another. I've been trying to get the NSWorkspace API to work:
[[NSWorkspace sharedWorkspace] launchApplication: @"OtherApp"];
But I keep getting this error, and my app doesn't launch:
StatusItemApp[822] LSOpenFromURLSpec() returned 1000 for application
OtherApp path (null).
I've even tried calling LaunchServices directly:
OSStatus anErr;
FSRef appRef;
anErr = LSFindApplicationForInfo(OtherAppCreatorType,
(CFStringRef) OtherAppBundleID,
NULL,
&appRef,
NULL);
if (anErr == noErr)
{
anErr = LSOpenFSRef(&appRef, NULL);
}
But, I get the same 1000 error at the LSOpenFSRef. However, the
LSFindApplicationForInfo returns noErr.
If I change the app name in the first case to "Clock" then that application
*is* launched.
I've tried moving my application to the Applications folder but even then it
isn't launched. Is there some setting I need in my plist to allow the launch
or is the OS just not aware of my application? The problem seems to be
totally specific to my app.
Thanks,
Dave
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.