Re: Address Book
Re: Address Book
- Subject: Re: Address Book
- From: Christopher Nebel <email@hidden>
- Date: Mon, 2 Sep 2002 21:08:03 -0700
On Sunday, September 1, 2002, at 02:38 PM, Paul Berkowitz wrote:
On Sunday, September 1, 2002, at 02:38 PM, Paul Berkowitz wrote:
In Outlook Express, Entourage, and many other apps, you don't need to
act as if each object maintains a nest of lists for each class of
elements. You just make a new element 'at' its parent, and that's >> it:
tell application "Microsoft Entourage"
set theMsg to make new outgoing message at the in box folder with
properties {whatever}
make new attachment at theMsg with properties {whatever}
make new contact with properties {whatever} -- (at the
application)
make new email address at contact "Joe Blow" with properties
{whatever}
end tell
Interesting that Eudora requires the beginning/end of business.
I guess it's the idea of the group of elements being a Collection
object that some languages have. But AppleScript doesn't have such an
animal, so it's interesting that some applications implement it this
way.
There are two issues: ordered vs. unordered collections, and whether or
not the "at" parameter is considered optional. You're correct that
AppleScript doesn't have a direct notion of an unordered collection
(unless you count records, which are something a bit different), but an
application is free to consider elements unordered if it wishes -- the
"at" parameter for "make" is forbidden or ignored in such cases.
The various contact info elements in Address Book are ordered, so in
that way it makes perfect sense to require the "at" parameter.
However, some applications *as a convenience* allow you to omit the
"at" parameter even on ordered elements, and pick some default location
for you. Address Book is not among these (yet); I've filed a bug.
--Chris Nebel
AppleScript Engineering
_______________________________________________
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.