• 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: Agent Applications and launchd
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Agent Applications and launchd


  • Subject: Re: Agent Applications and launchd
  • From: John Stiles <email@hidden>
  • Date: Thu, 5 Jan 2006 10:42:44 -0800

On Jan 5, 2006, at 8:54 AM, Jerry Krinock wrote:

After I replaced my 50 lines of code with calls to the functions in Apple's
LoginItemsAE.c and re-tested my app, I discovered another reason why using
LoginItemsAE.c is a good idea: AliasData.


Apple's code adds the AliasData key/value pair to your login item. My own
code did not do that.


I could not find any documentation on AliasData; I presume that it is needed
for your login item to launch if the user moves it, and is probably some
kind of serialized FSRef, which I would have had to reverse- engineer had I
continued developing with my own code.

Aliases themselves are not FSRefs. They're an opaque structure which is used to point to a file, even if the file moves or gets renamed.
http://developer.apple.com/documentation/Carbon/Reference/ Alias_Manager/Reference/reference.html


Sadly, Cocoa has not received much support for aliases. I am honestly kind of surprised by this, since they are really useful and tend to make a lot of stuff more user-friendly. (For example, notice how "Open Recent" in the File menu of most Cocoa apps can find your documents even if you've moved them.) The good news is that there are a lot of open-source classes which wrap the Alias Manager; I've used NDAlias and it worked great for me.

_______________________________________________
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


References: 
 >Re: Agent Applications and launchd (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Re: Sheets to dialogs
  • Next by Date: Re: Help me interpret this initWithBytes/memcpy crash log?
  • Previous by thread: Re: Agent Applications and launchd
  • Next by thread: Re: Agent Applications and launchd
  • Index(es):
    • Date
    • Thread