Horrible bugs in Address Book
Horrible bugs in Address Book
- Subject: Horrible bugs in Address Book
- From: Paul Berkowitz <email@hidden>
- Date: Wed, 02 Oct 2002 11:47:03 -0700
On 10/2/02 10:41 AM, "Jeff Porten" <email@hidden> wrote:
>
The more important reason is that I'm stoked over the move to make
>
Address Book a system-level database. There's just all sorts of
>
wonderful possibilities on the horizon if all iApp objects are
>
addressable by applications, and an important component of this is
>
AppleScript. But for right now, I'm still stymied over my attempt to
>
have my Mail sorted by sender membership in groups; partially because I
>
haven't put much time into this yet, and partially because the Mail
>
dictionary isn't there yet.
OK, here are some things i haven't reported yet.
1) It appears that all those other apps that can sync with Address Book (at
the moment that seems to mean mostly fax applications and the beta iSync,
but there will be lots more) access it via some Cocoa methods. these expect,
and require, that the phone numbers and postal addresses for each contact,
be stored in a particular location. Those locations correspond to the order
of the labels you see when you Edit any person in the UI. For phones, that
order is:
work
home
mobile
main
home fax
work fax
pager
other
For postal addresses, it's
home
work
other
Now when you add or remove phones in the UI, it doesn't matter what you do,
or which phones exist or not. That order remains the same, and everything is
hunky-dory for syncing to other apps.
But when you create phones by AppleScript (make new phone at end of phones,
or beginning of phones) it completely messes up that order and everything is
WRONG when the fax app, or iSync, tries to get the work fax, form example.
In some cases it can be rectified manually by resetting twice (try that for
1000 contacts), but in many cases it cannot be rectified at all. You are
doomed. You have to delete all your contacts, create them manually or import
by vCard, and decide never to script Address Book again. This "order" ting
may sound trivial, but it is not trivial. It is critical. An unmitigated
disaster.
I have tried to work around this by creating dummy phones in the correct
order for every contact. Aside form looking messy, that is not satisfactory,
because it runs into the next bug:
2) In the UI, non existent phones and other elements are represented by a
dimmed background "Phone" placeholder, which can be edited. In AppleScript,
it simply doesn't exist. The properties property of any element shows
missing properties as 'missing value'. (There's yet another bug that setting
a variable to a non-existing object doesn't error until you try to get or
use the variable, but that one can be worked around.) Fine. But in creating
dummy phones I can't set it's properties to {label:"home", value:missing
value}. that doesn't work. It should. Instead, if you set the value to "",
you get a dummy phone all right - but it's completely uneditable and
unselectable in the UI! So someone wanting to create a home phone later
would have to make a second one, which will mess up the order again! As a
very klunky workaround, you can set the value to " " (space). but someone
then trying to edit the space has to be extremely careful not to remove it
unless replacing it, BUT - if replacing it MUST remove it first by a very
awkward forward-delete. Otherwise the typing for the new phone number takes
place NOT in the 'value" windowlet but beneath it, as if part of the label,
in bold. Again, if you save that, you are completely screwed - it will be
saved as one of those uneditable empty phones, and put the order out of
whack when you try a second time. Disaster again. No one would ever get that
right.
3) In order for those other apps to access the phones and addresses, the
labels have to be the _correct localized version_. So you can't script the
label in English or it gets entered as a Custom label and puts the order out
again. Disaster again. Somehow, you'd have to know what the correct key name
is for "work fax" in Norwegian. How? I asked on the list (I'm sure there's
some Coca way to do it, maybe even by shell script) but no one knows.
All this, plus all the other bugs i mentioned when Jaguar came out, plus
more bugs i haven't mentioned yet, makes Address Book essentially
unscriptable. Anyone who used the script that came in Mail scripts to import
Entourage contacts has already screwed up Address Boom irremediably. You'll
have to delete everything and import by vCard if you want to use Address
Book in the way you've looked forward to - as a system-wide database
accessible by all the digital hub apps.
Many of the developers implementing scriptability still don't know how to do
it properly, it seems, to make it work with the rest of the app. It's
sloppy, and it's frustrating to scripters. I hope it gets fixed in due
course.
--
Paul Berkowitz
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.