Platforms to show: All Mac Windows Linux Cross-Platform

ABMultiValueMBS class   Deprecated

Type Topic Plugin Version macOS Windows Linux iOS Targets
class Addressbook MBS MacCocoa Plugin 7.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
This item is deprecated and should no longer be used. You can use CNLabeledValueMBS class instead.
Represents values of type ABMultiXXXXXProperty.
Example
// shows all websites with labels

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

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

MsgBox label+" -> "+value
next

All values in an ABMultiValue must be of the same type (kABMultiStringProperty: all values must be strings....)

In case your application needs to store away a reference to a specific value/label pair, use the identifier. Index won't work in this case because any client can add/remove/reorder a multivalue making your index point to the wrong pair. Identifiers are unique Ids.

All methods in this class will catch exceptions from Cocoa and raise a NSExceptionMBS instead. Using the message, name and reason properties you can see what was the reason for this exception. Please report if you find a method which does not handle exceptions correct.
This is an abstract class. You can't create an instance, but you can get one from various plugin functions.

Sub classes:

Blog Entries

Xojo Developer Magazine

Release notes

Some examples using this class:

Some related classes:


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


ABGroupMBS   -   ABMutableMultiValueMBS


The biggest plugin in space...