• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Launch Path Not Accessible
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Launch Path Not Accessible


  • Subject: Re: Launch Path Not Accessible
  • From: "Michael Ash" <email@hidden>
  • Date: Sat, 2 Aug 2008 17:51:00 -0400

On Sat, Aug 2, 2008 at 5:20 PM, Steve Cronin <email@hidden> wrote:
> Andrew:
>
> Thanks for the slap on the head!
> So I chmod'ed the file and no longer get the 'not accessible error'  YEAH!
>
> BUT now I get:
> *** NSTask: Task create for path '/Users/steve/Library/Application
> Support/XYZ/Scripts/myUseful.o' failed: 88, "Malformed Mach-o file"

Somehow you're building an object file, not an executable. If you're
building in Xcode, you'll want to use the "CoreFoundation Tool"
project template, or the Carbon->Shell Tool target template. If you're
not building in Xcode, build in Xcode.

> So I must be missing something about the contents of script files.
> Here's my script:
>
> myUseful.m
> #import <Cocoa/Cocoa.h>
> int main(int argc, char **argv)
> {
>        char dummy;
>        read(STDIN_FILENO, &dummy, 1);
>        [NSAutoreleasePool new];
>        NSURL *url = [NSURL fileURLWithPath:[NSString
> stringWithUTF8String:argv[1]]];
>        LSOpenCFURLRef((CFURLRef)url, NULL);
>        return 0;
> }
>
> You will just have to trust me that I DO need to launch the file in this
> manner.
> What do I need to do to this file to make it into the correct format?

Does it take that much extra effort to explain that this tool is to
facilitate relaunching your application? It's a pretty standard
technique, and avoids the inevitable "this makes no sense!" reaction
from the "trust me".

Mike
_______________________________________________

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

References: 
 >Launch Path Not Accessible (From: Steve Cronin <email@hidden>)
 >Re: Launch Path Not Accessible (From: Andrew Farmer <email@hidden>)
 >Re: Launch Path Not Accessible (From: Steve Cronin <email@hidden>)

  • Prev by Date: Re: Coding around a known bug
  • Next by Date: Re: Faster alternative to NSImage draw/composite?
  • Previous by thread: Re: Launch Path Not Accessible
  • Next by thread: Re: Launch Path Not Accessible
  • Index(es):
    • Date
    • Thread