AddressBookGroup
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. |
Manages an Address Book group.
Properties | ||||
|
Methods | ||||||
|
Sample Code
This example gets the names of the groups in the current user's Address Book and displays them in a ListBox.
Dim book As AddressBook
Dim groups() As AddressBookGroup
Dim i As Integer
book = System.AddressBook
groups = book.Groups
For i = 0 To Ubound(groups)
ListBox1.addrow groups(i).Name
Next
Dim groups() As AddressBookGroup
Dim i As Integer
book = System.AddressBook
groups = book.Groups
For i = 0 To Ubound(groups)
ListBox1.addrow groups(i).Name
Next
This code gets two Contact fields from the first group and displays them in a ListBox.
Dim book As AddressBook
Dim groups() As AddressBookGroup
Dim contacts() As AddressBookContact
Dim i As Integer
book = System.AddressBook
groups = book.Groups // get the array of groups, assume at least one group
contacts = groups(0).Contacts // get array of contacts in first group
For i = 0 To Ubound(contacts)
ListBox1.AddRow(contacts(i).CompanyName)
ListBox1.Cell(i, 1) = contacts(i).LastName
Next
Dim groups() As AddressBookGroup
Dim contacts() As AddressBookContact
Dim i As Integer
book = System.AddressBook
groups = book.Groups // get the array of groups, assume at least one group
contacts = groups(0).Contacts // get array of contacts in first group
For i = 0 To Ubound(contacts)
ListBox1.AddRow(contacts(i).CompanyName)
ListBox1.Cell(i, 1) = contacts(i).LastName
Next
See Also
AddressBook, AddressBookAddress, AddressBookContact, AddressBookData, AddressBookRecord classes.