Re: Address Book scripting bug
Re: Address Book scripting bug
- Subject: Re: Address Book scripting bug
- From: "Nigel Garvey" <email@hidden>
- Date: Wed, 29 Dec 2010 15:40:05 +0000
Hi, Axel. Thanks for your interest.
Axel Luttgens wrote on Wed, 29 Dec 2010 11:16:04 +0100:
>Le 28 déc. 2010 à 23:40, Nigel Garvey a écrit :
>> While seated at the G5, I wrote another script to insert the appropriate
>> ISO county codes into the 'addresses' of my overseas contacts, which had
>> the pleasing effect of causing the displayed addresses to be formatted
>> correctly for those countries. But when I ran the same script on the
>> MacBook Pro, the displayed addresses simply disappeared! It turns out,
>> after some experimentation, that version 5.0.3 only understands country
>> codes when they're lower case, which is wrong in both ISO and
>> AppleScript contexts.
>After some investigation, it appears that the concept of country code in an
>address record context seems to be an Apple thing […]
>[…] as a strictly lowercase list (in spite of an explicit reference to ISO
>country codes), and I couldn't find any mention of case-insensitivity in
>the docs.
>
>So, one could be tempted to say: "works as intended".
It's the intention that's bugged then. :) Scripters shouldn't have
case forced on them here — especially not Apple's idiosyncratic use of it.
>Out of curiosity, could you try with AB 4.0.6 to set an address' country
>code to, say, "UK" and then have a look at the value displayed in the
>person's vcard property, as well as at the value stored in the exported
>vCard?
With AB 4.0.6, a country code which has been set in the upper case with
AppleScript is returned as upper-case both in the vcard and as the
'country code' value in AppleScript. When the country format is set in
the pop-up menu in the GUI, the country code returned is lower-case.
When the country format is set to "United Kingdom" in the pop-up menu,
the code returned is "uk", which is not only lower-case but wrong! It's
(more) correctly returned as "gb" by AB 5.0.3.
NG
_______________________________________________
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