Platforms to show: All Mac Windows Linux Cross-Platform

Back to ABMultiValueMBS class.

ABMultiValueMBS.Constructor   Private

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Addressbook MBS MacCocoa Plugin 13.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The private constructor.

ABMultiValueMBS.copy as ABMultiValueMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Addressbook MBS MacCocoa Plugin 7.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Creates an immutable copy of the data.

Returns nil on any error.

ABMultiValueMBS.edit as ABMutableMultiValueMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Addressbook MBS MacCocoa Plugin 7.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Creates a mutable copy of the data.

Returns nil on any error.

ABMultiValueMBS.identifierAtIndex(index as UInt32) as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Addressbook MBS MacCocoa Plugin 7.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns an identifier at a given index

Returns "" on any error.
Index is zero based.

ABMultiValueMBS.identifiers as string()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Addressbook MBS MacCocoa Plugin 15.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns list of identifiers.

ABMultiValueMBS.indexForIdentifier(identifier as string) as UInt32

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Addressbook MBS MacCocoa Plugin 7.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the index of a given identifier

Returns NotFound (&h7fffffff) on any error.

Some examples using this method:

ABMultiValueMBS.indexForLabel(label as string) as UInt32

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Addressbook MBS MacCocoa Plugin 18.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the index of a given label

Returns NotFound (&h7fffffff) on any error.

ABMultiValueMBS.labelAtIndex(index as UInt32) as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Addressbook MBS MacCocoa Plugin 7.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns a label at a given index.
Example
// get an entry
dim a as new ABAddressBookMBS
dim p as ABPersonMBS = a.owner

// query all emails
dim e as ABMultiValueMBS = p.valueForProperty(a.kABEmailProperty)

// walk over all
dim u as Integer = e.count-1
for i as Integer = 0 to u
dim label as string = e.labelAtIndex(i)
dim value as string = e.valueAtIndex(i)

// show label and value for this entry
MsgBox str(i)+": "+label+", "+value

// is it home?
if label = a.kABEmailHomeLabel then
MsgBox "Home: "+value
end if
next

Returns "" on any error.
Index is zero based.

Some examples using this method:

ABMultiValueMBS.labelForIdentifier(identifier as string) as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Addressbook MBS MacCocoa Plugin 7.7 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the label with the given identifier.
Example
// same as the following code, but with index bound checking:

dim s as string
dim identifier as string = "fill the identifier here"
dim a as ABMultiValueMBS
// get multivalue somehow

s=a.labelAtIndex(a.indexForIdentifier(identifier))

Returns "" if identifier is not found.
A convenience method.

ABMultiValueMBS.labels as string()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Addressbook MBS MacCocoa Plugin 15.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns list of labels.

ABMultiValueMBS.valueAtIndex(index as UInt32) as Variant

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Addressbook MBS MacCocoa Plugin 7.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns a value at a given index
Example
// shows all websites with labels

dim a as new ABAddressBookMBS
dim p as ABPersonMBS = a.owner
dim m as ABMultiValueMBS = p.valueForProperty(a.kABURLsProperty)

dim u as Integer = m.count-1
for i as Integer = 0 to u
dim label as string = m.labelAtIndex(i)
dim value as string = m.valueAtIndex(i)

MsgBox label+" -> "+value
next

Returns nil on any error.
Index is zero based.

ABMultiValueMBS.valueForIdentifier(identifier as string) as Variant

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Addressbook MBS MacCocoa Plugin 7.7 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the value with the given identifier.

Returns nil if identifier is not found.
A convenience method.

Some examples using this method:

ABMultiValueMBS.valueForLabel(label as string) as Variant

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Addressbook MBS MacCocoa Plugin 7.7 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the value for the value with the given label.
Example
dim a as new ABAddressBookMBS
dim p as ABPersonMBS
dim m as ABMultiValueMBS

a=new ABAddressBookMBS
p=a.owner

m=p.valueForProperty(a.kABPhoneProperty)

MsgBox "Work phone: "+m.valueForLabel(a.kABPhoneWorkLabel)
MsgBox "Mobile phone: "+m.valueForLabel(a.kABPhoneMobileLabel)

Returns nil if not value exists for the label.
A convenience method.

ABMultiValueMBS.values as Variant()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Addressbook MBS MacCocoa Plugin 16.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns list of all values.

Returns nil on any error.
Useful to get all email addresses as array.

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


The biggest plugin in space...