|
Contacts' Iterator
The Contacts object can be iterated through the
Enumerator
object of JScript.
Return Value
A Contact object.
The iterator typically fails for the following reason:
- The Contacts object was generated by a different active user
than the one currently signed-in (when the object refers to the
entire user's contact list).
Remarks
Each Contacts object keeps track of its own iterator.
This means that even if two objects refer to the same collection of
contacts, they'll contain two different iterators. This is why
Contacts objects must first be assigned to variables before
being used in an Enumerator.
Example
The current user must be signed for this code to succeed.
Debug.Trace("Contacts in the user's contact list:");
var Contacts = Messenger.MyContacts;
var e = new Enumerator(Contacts);
for(; !e.atEnd(); e.moveNext())
{
var Contact = e.item();
Debug.Trace(" " + Contact.Email);
}
Function Information
| Object |
Contacts |
| Availability |
Messenger Plus! Live 4.00 |
See Also
Contacts Object, Contact Object, JScript's
Enumerator Object.
|