On Jun 30, 2011, at 9:17 AM, Arnaud Nicolet wrote: > Le 30 juin 11 à 18:11, Christian Schmitz a écrit: > >> Please lookup the email address of the user with the addressbook: >> >> // open addressbook >> dim a as new ABAddressBookMBS >> >> // get user >> dim p as ABPersonMBS = a.owner >> >> // lookup all emails >> dim m as ABMultiValueMBS = p.valueForProperty(a.kABEmailProperty) >> >> // pick primary one >> MsgBox m.valueForIdentifier(m.primaryIdentifier) > > Ah yes, didn't think it was reliable. > Thank you!
It isn't reliable without some error checking. There are a few places in the above routine that can result in nil objects. Be sure to check for them. _______________________________________________ Mbsplugins_monkeybreadsoftware.info mailing list [email protected] https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info
