LSOpenFromURLSpec () problems
LSOpenFromURLSpec () problems
- Subject: LSOpenFromURLSpec () problems
- From: Paul Forgey <email@hidden>
- Date: Sun, 27 Feb 2005 00:04:43 -0800
I am trying to launch an application with a list of items to open using
LSOpenFromURLSpec from Cocoa. The application is inside a file NSURL
and the items to open are also file NSURL's inside an NSMutableArray:
LSLaunchURLSpec spec;
spec.appURL = (CFURLRef)url;
spec.itemURLs = (CFArrayRef)[toDoList objectForKey:url];
spec.passThruParams = NULL;
spec.launchFlags = kLSLaunchDefaults;
spec.asyncRefCon = NULL;
NSLog (@"AppURL:%@ objects:%@", spec.appURL, spec.itemURLs);
err = LSOpenFromURLSpec (&spec, NULL);
if (err != 0)
NSLog (@"Error launching %@: %d", url, err);
NSURL and NSArray are both "toll free bridged" with CFURLRef and
NSArrayRef, so I should be fine. Shouldn't I?
From the NSLog which gets executed before LSOpenFromURLSpec, I can see
the appURL and files are valid. Once inside LSOpenFromURLSpec, this
happens and control is never returned to the caller:
2005-02-26 23:50:09.716 My App[3757] *** -[NSPathStore2 scheme]:
selector not recognized
2005-02-26 23:50:09.732 My App[3757] *** NSThread: ignoring exception
'NSInvalidArgumentException' (reason '*** -[NSPathStore2 scheme]:
selector not recognized') that raised during delayed perform of target
0x507700 and selector '_didCloseFile:'
I have no idea what to make of this.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden