AddressBookContact
From Xojo Documentation
This item was deprecated in version 2019r2. |
Class (inherits from AddressBookRecord)
This class is only available on the macOS platform. For cross-platform compatibility, use #If...#Endif with the Target... specifiers to make sure you will not attempt to use this class on an incompatible platform. |
Holds a Contact record in a macOS Address Book.
Constructors | |
|
Notes
The methods of the AddressBookData class give you access to the labels, names, values, and other properties of AddressBookContact records. Use the Value method to get and set values.
Sample Code
This method gets the current user's email addresses. It uses the Count and Value methods of the AddressBookData class to do so.
Dim Book As AddressBook
Dim myContact As AddressBookContact
book = System.AddressBook
myContact = book.CurrentUser
For i As Integer =0 To myContact.emailAddresses.Count - 1
ListBox1.AddRow(myContact.emailAddresses.Value(i))
Next
Dim myContact As AddressBookContact
book = System.AddressBook
myContact = book.CurrentUser
For i As Integer =0 To myContact.emailAddresses.Count - 1
ListBox1.AddRow(myContact.emailAddresses.Value(i))
Next
The following method sets the value of the FirstName field.
Dim Book As AddressBook
Dim myContact As AddressBookContact
book = System.AddressBook
myContact = book.CurrentUser
myContact.FirstName = "Boris"
// or using AddressBookData.Value method
myContact.FirstName.Value = "Boris"
Dim myContact As AddressBookContact
book = System.AddressBook
myContact = book.CurrentUser
myContact.FirstName = "Boris"
// or using AddressBookData.Value method
myContact.FirstName.Value = "Boris"
See Also
AddressBook, AddressBookAddress, AddressBookData, AddressBookGroup, AddressBookRecord classes.