Platforms to show: All Mac Windows Linux Cross-Platform

Back to ABGroupMBS class.

ABGroupMBS.addMember(group as ABPersonMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Addressbook MBS MacCocoa Plugin 7.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Adds person to this group.
Example
dim wbook As new ABAddressBookMBS
dim Group as new ABGroupMBS

if not Group.setValue("Test Group", wbook.kABGroupNameProperty) then
MsgBox "Failed to set group name."
Return
end if

if not wbook.addRecord(Group) then
MsgBox "Failed to add group to database."
return
end if

dim Person as new ABPersonMBS

if not person.setValue("John", wbook.kABFirstNameProperty) then
MsgBox "Failed to set first name."
Return
end if

if not person.setValue("Miller", wbook.kABLastNameProperty) then
MsgBox "Failed to set last name."
Return
end if

if not wbook.addRecord(person) then
MsgBox "Failed to add person to database."
return
end if

if not group.addMember(person) then
MsgBox "Failed to add person to group."
Return
end if

if not wbook.save then
MsgBox "Failed to save addressbook."
return
end if

MsgBox "Created test group with a person."

Does nothing if person is already part of this group (returns false)
Returns true if successful.

ABGroupMBS.addSubgroup(group as ABGroupMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Addressbook MBS MacCocoa Plugin 7.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Add group to this group.

Does nothing if group is already part of this group (returns false)
Recursions are not allowed (returns false)
Returns true if successful

ABGroupMBS.Constructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Addressbook MBS MacCocoa Plugin 7.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Creates a new ABGroup object.

Available in Mac OS X 10.5 or newer.

See also:

ABGroupMBS.Constructor(addressBook as ABAddressBookMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Addressbook MBS MacCocoa Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Creates a new ABGroup object in the given addressbook.

See also:

ABGroupMBS.distributionIdentifierForProperty(propertyName as string, person as ABPersonMBS) as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Addressbook MBS MacCocoa Plugin 7.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the distribution identifier for a given property and person.

If not set then returns the property primary identifier.
Returns the distribution identifier or "" if not successful.
(Read and Write computed property)

ABGroupMBS.members as ABPersonMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Addressbook MBS MacCocoa Plugin 7.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns an array of ABPersonMBS.

Returns an empty array if this group doesn't contain any people.
Returns an empty array on any error.

ABGroupMBS.parentGroups as ABGroupMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Addressbook MBS MacCocoa Plugin 7.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns an array of ABGroup this group belongs to.

Returns an empty array if this group doesn't belong to any groups.
Returns an empty array on any error.

ABGroupMBS.removeMember(group as ABPersonMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Addressbook MBS MacCocoa Plugin 7.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Removes group from this group.

Does nothing if group is not part of this group (returns false)
Returns true if successful.

ABGroupMBS.removeSubgroup(group as ABGroupMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Addressbook MBS MacCocoa Plugin 7.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Removes group from this group.

Does nothing if group is not part of this group (returns false).
Returns true if successful.

ABGroupMBS.subgroups as ABGroupMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Addressbook MBS MacCocoa Plugin 7.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns an array of ABGroup

Returns an empty array if this group doesn't contain any other groups.
Returns an empty array on any error.

The items on this page are in the following plugins: MBS MacCocoa Plugin.


The biggest plugin in space...