Re: Getting iPhoto album ID with AppleScript
Re: Getting iPhoto album ID with AppleScript
- Subject: Re: Getting iPhoto album ID with AppleScript
- From: Philip Aker <email@hidden>
- Date: Sat, 13 Oct 2007 17:13:45 -0700
On 2007-13-10, at 07:40, has wrote:
Despite what iPhoto's dictionary claims, it's actually returning an
SInt64,
That's the problem in a nutshell unless, as Bill mentioned, a UUID is
being used in more recent versions of iPhotol
and I wouldn't trust either AppleScript or its built-in coercion
handlers to handle those reliably. It's impossible for AS to
correctly handle all 64-bit ints: its integer type is limited to 30-
bits and it uses 64-bit floats for anything else, so you can lose
anything from 0 to 12 bits of precision. (e.g. iTunes scripters
have long had this problem when using its 'persistent ID' property
in AppleScript; iTunes recently finally caved to AS's stupidity and
switched from SInt64s to AS-proof hex strings instead.) None of
this is a problem with other bridges such as appscript that handle
64-bit ints correctly, btw.
It's not only AppleScript that's at fault here. There's also the
grotesque sin of omission in both CoreFoundation and Foundation
number classes for unsigned ints, and ints of arbitrary dimension
(like 128-bit and 256-bit ints). For plist purposes (such is the case
here) this would most likely mean an attribute for the integer and
real keys (<integer type=UInt32">0</integer>) so that the whole
situation can more forward. For instance UUIDs can be specified in
128-bit ints.
I've put in an enhancement bug for coordination with this
international standard: <http://www.w3.org/TR/xmlschema-2/#built-in-
datatypes>. Much appreciated if any one duplicates it.
Philip Aker
email@hidden
_______________________________________________
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