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 <k...@codeweavers.com>
To: Erg Consultant <erg_consult...@yahoo.com>
Cc: cocoa-dev@lists.apple.com
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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to