Re: Address Book scripting bug
Re: Address Book scripting bug
- Subject: Re: Address Book scripting bug
- From: Axel Luttgens <email@hidden>
- Date: 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.
>
> (Version 4.0.6 has its own bug in that it insists on reformatting UK
> telephone numbers incorrectly, but that seems to be fixed now.)
Hello Nigel,
Checked that one here and, indeed, Address Book 5.0.3 definitively prefers 'be' to 'BE'...
After some investigation, it appears that the concept of country code in an address record context seems to be an Apple thing; hence its storage as an X-ABADR entry in a vCard.
The allowable codes are provided at:
http://developer.apple.com/library/mac/#documentation/UserExperience/Reference/AddressBook/Classes/ABPerson_Class/Reference/CountryCodes.html#//apple_ref/doc/uid/TP40003945-RH2-SW1
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".
If true, then perhaps did Address Book 4.0.6 provide some kind of undocumented courtesy that just got lost in subsequent versions.
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?
Axel
_______________________________________________
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