Re: birth date from Address Book
Re: birth date from Address Book
- Subject: Re: birth date from Address Book
- From: Paul Berkowitz <email@hidden>
- Date: Wed, 12 Mar 2003 08:29:11 -0800
On 3/12/03 6:20 AM, "Darwin Zins" <email@hidden> wrote:
>
Thanks for the information Paul. What version of OS X and Address Book
>
are you using? When I open the dictionary for Address Book I can't
>
find any 'properties' property, but I don't get any errors trying to
>
access any of the properties in the Address Book either. I am on Mac
>
OS X 10.2.4 and my Address Book is V 3.0.3 (v223).
Same. E.g.:
Class person: A Person Record in the address book database.
Plural form:
people
Elements:
<snip>
Super classes:
entry
Properties:
class type class [r/o] -- (inherited from the 3item2 class) The class
of the object.
properties record -- (inherited from the 3item2 class) All of the
object's properties.
This is in Script Debugger, which conveniently lists all the properties
inherited from super-classes. Otherwise, if you're in in Script Editor, you
have to carefully study the Object Model and remember that properties of
classes are inherited by their sub-classes. So:
Standard Suite: Common classes and commands for most applications.
Class item: A scriptable object.
Plural form:
items
Properties:
class type class [r/o] -- The class of the object.
properties record -- All of the object's properties.
Address Book Script Suite: commands and classes for Address Book scripting.
Class entry: A entry in the address book database
Plural form:
entries
Properties:
<Inheritance> item [r/o] -- All of the properties of the superclass.
Class person: A Person Record in the address book database.
Plural form:
people
Elements:
<snip>
Properties:
<Inheritance> entry [r/o] -- All of the properties of the superclass.
etc.
See how it works? When you check 'person', you see '<Inheritance> entry
[r/o] '. So then you have to check 'entry' and its inheritance listing shows
you need to check 'item'. Now you know that every item of any type has a
'properties' property, which is actually a very useful implementation (aside
from the 'missing value' stuff). Let credit be given where it's due this
time to the Cocoa AppleScript developers: this is a great implementation,
especially because it's built in automatically for all items. It means that
for 'person', which has some 16 properties of its own plus the three very
important ones it inherits from 'entry and two from 'item', you can just
get the 'properties' record with one single AppleEvent, and then access all
the properties you need from that record . Some Classic and Carbon apps had
implemented 'properties' (I believe this was an idea in which Cal Simone
played a part) but few, if any, have it in such a thorough-going manner. By
making it a property of 'item' in the Cocoa Standard Suite, all application
items automatically get it for free.
--
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.