• 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: Creating alias programatically
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Creating alias programatically


  • Subject: Re: Creating alias programatically
  • From: Charles Srstka <email@hidden>
  • Date: Tue, 23 Sep 2008 18:40:09 -0500

On Sep 23, 2008, at 5:02 PM, Nick Zitzmann wrote:

On Sep 23, 2008, at 3:57 PM, chaitanya pandit wrote:

It created an executable file with name foobar alias on desktop but when i try to open it it says
"chaitanya-pandits-macbook:~ chaitanya$ /Users/chaitanya/Desktop/ foobar\ alias ; exit;
-bash: /Users/chaitanya/Desktop/foobar alias: cannot execute binary file
logout
[Process completed]"


Any idea what i'm doing wrong?


You're using an alias file; that's what you're doing wrong. As I said, only Carbon and certain AppKit classes resolve aliases. BASH doesn't use Carbon or AppKit; it uses lower level stuff that doesn't resolve aliases. You'll have to use links (hard or symbolic) instead.

From the looks of it, it doesn't sound like she's trying to use an alias in bash; more likely, she's trying to create an alias file that she would double-click in the Finder, but she's doing it incorrectly in such a manner that LaunchServices is guessing that the file is an executable and thus trying to open it with the Terminal.


Charles
_______________________________________________

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: 
 >Creating alias programatically (From: chaitanya pandit <email@hidden>)
 >Re: Creating alias programatically (From: Nick Zitzmann <email@hidden>)
 >Re: Creating alias programatically (From: chaitanya pandit <email@hidden>)
 >Re: Creating alias programatically (From: Nick Zitzmann <email@hidden>)
 >Re: Creating alias programatically (From: chaitanya pandit <email@hidden>)
 >Re: Creating alias programatically (From: Nick Zitzmann <email@hidden>)
 >Re: Creating alias programatically (From: chaitanya pandit <email@hidden>)
 >Re: Creating alias programatically (From: Nick Zitzmann <email@hidden>)

  • Prev by Date: Re: Creating alias programatically
  • Next by Date: Re: [ABAddressBook addressBook] vs. [ABAddressBook sharedAddressBook]
  • Previous by thread: Re: Creating alias programatically
  • Next by thread: Re: Creating alias programatically
  • Index(es):
    • Date
    • Thread