• 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: Scripting iCal. 10.4 and 10.5 UID's incompatible?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scripting iCal. 10.4 and 10.5 UID's incompatible?


  • Subject: Re: Scripting iCal. 10.4 and 10.5 UID's incompatible?
  • From: Hamish Sanderson <email@hidden>
  • Date: Tue, 30 Oct 2007 15:35:24 +0000

Paul Berkowitz wrote:

Somebody with Leopard and either Script Debugger or Smile should be able to
tell you what the raw code is for 'uid' - if that property of event still
exists in Leopard. I suspect that it's «ID » [...] In Tiger the raw code for 'uid' is «wr10» .

Paul is correct. The iCal engineers have changed the 'uid' property's underlying AE code from 'wr10' to 'ID ' while leaving the name the same. They've done this to allow calendar objects to be referred to by id [1], e.g.:


tell application "iCal" to calendar id "9D2F76C1-6584-4D1E-8C8C- CCE88958BF70"

You'll also notice that iCal now uses by-id calendar specifiers when returning object references; previously it used by-index references.

It's good that iCal is now preferring to use the more reliable by-id reference form; unfortunately, they haven't made this change in a backwards-compatible way. What they should really have done is 1. added a new 'id=ID\x20\x20' property, and 2. leaving the original though now-obsolete 'uid=wr10' definition intact for backwards- compatibility, marking it hidden it so it's no longer visible in Script Editor's dictionary window [2].

Anyway, consider filing a bug report on the issue and feel free to include any of the above if it helps. In the meantime, if your script really needs to work across OS versions, you'll have to write some extra code that checks the iCal version number and then asks for either 'id of...' or '«property wr10» of...' when referring to this property.

HTH

has

[1] Without having to write any special code to support it, that is; Cocoa Scripting [presumably] looks for the 'ID ' code to work its magic, so by using this code they get by-id reference support for free.

[2] IIRC, I think this can all be done using the sdef format's 'synonym' element, though better to ask someone more familiar with Cocoa Scripting like Chris Nebel or Matt Neuburg to find out for sure. Also see Apple's Scripting Interface Guidelines and the sdef manpage.

--
http://appscript.sourceforge.net
http://rb-appscript.rubyforge.org

_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
  • Prev by Date: Re: Scripting iCal. 10.4 and 10.5 UID's incompatible?
  • Next by Date: Re: Where's the updated AppleScript Language Guide?
  • Previous by thread: Re: Scripting iCal. 10.4 and 10.5 UID's incompatible?
  • Next by thread: Re: Scripting iCal. 10.4 and 10.5 UID's incompatible?
  • Index(es):
    • Date
    • Thread