Re: Why is NSString->FSRef so hard?
Re: Why is NSString->FSRef so hard?
- Subject: Re: Why is NSString->FSRef so hard?
- From: Erg Consultant <email@hidden>
- Date: Mon, 27 Apr 2009 22:21:25 -0700 (PDT)
LSOpenCFURLRef doesn't work either - kLSApplicationNotFoundErr.
The nature of the file is the app's exe which is normally inside the MacOS dir.
However, all this works perfectly fine if there are no special chars in the path - the exe launches just fine. I find it hard to believe that Apple would issue an API that executes single executable binaries only in the case that they don't have special chars in the path.
Erg
________________________________
From: Ken Thomases <email@hidden>
To: Erg Consultant <email@hidden>
Cc: email@hidden
Sent: Monday, April 27, 2009 10:11:43 PM
Subject: Re: Why is NSString->FSRef so hard?
On Apr 27, 2009, at 11:51 PM, Erg Consultant wrote:
> 4) I verified that the file I am trying to open using LSOpenApplication exists at the path the URL points to when it gets converted to an FSRef.
>
> So why isn't it working? Why does LSOpenApplication give me an error?
What is the path/URL/FSRef pointing to? What is the nature of the file-system object at that location?
LSOpenApplication is expecting it to be an application bundle, generally. (There are some corner cases that are extremely rare in practice.)
Have you considered using one of the other Launch Services functions, like LSOpenCFURLRef?
Regards,
Ken
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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