• 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: Changing the desktop picture
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changing the desktop picture


  • Subject: Re: Changing the desktop picture
  • From: Shawn Erickson <email@hidden>
  • Date: Wed, 26 May 2004 13:18:27 -0700

On May 26, 2004, at 5:10 AM, M. Uli Kusterer wrote:

At 4:21 Uhr -0700 26.05.2004, Killobit wrote:
I'm new to the lists and here is my first question (probably the first of many =) )

Is it possilbe to change the desktop picture programmatically and if so, how do i do it?

Thanks very much in advance for ANY and ALL help

~/Library/Preferences/com.apple.desktop.plist

And yes, that "garbage data" in there is an AliasRecord, so you'll want to use the excellent BDAlias class to produce that.

Note that this may not be all, though. You'd need some way to tell the Finder to reload the image, and right now the only way I know is to quit and restart the Finder, which you wouldn't want to do too often.

Folks you should never ever try to modify plist programmatically to do something like this. It is fragile and often will not work without doing funky things (like having to quit Finder in the above). A plist is own by the related application and is not a stable "API" into those applications.

You should use a provided API, command line tool or Apple Events to get done what you want to get done. Look for those first before even considering mucking with a plist and if they don't exist file an enhancement request with Apple about getting a proper method in place, regardless strongly consider not mucking with the plist.

-Shawn
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Changing the desktop picture
      • From: Killobit <email@hidden>
References: 
 >Changing the desktop picture (From: Killobit <email@hidden>)
 >Re: Changing the desktop picture (From: "M. Uli Kusterer" <email@hidden>)

  • Prev by Date: Re: NSOutlineView, NSBrowserCell and Images
  • Next by Date: Re: monitoring retainCount
  • Previous by thread: Re: Changing the desktop picture
  • Next by thread: Re: Changing the desktop picture
  • Index(es):
    • Date
    • Thread