I'm using the following code from Uli's UKCrashReporter:

ABMultiValue* emailAddresses = [[[ABAddressBook sharedAddressBook] me] valueForProperty: kABEmailProperty]; NSString* emailAddr = NSLocalizedStringFromTable (@"MISSING_EMAIL_ADDRESS",@"UKCrashReporter",@"");
        
        if( emailAddresses )
        {
                NSString*               defaultKey = [emailAddresses 
primaryIdentifier];
                if( defaultKey )
                {
unsigned int defaultIndex = [emailAddresses indexForIdentifier: defaultKey];
                        if( defaultIndex != NSNotFound )
                                emailAddr = [emailAddresses valueAtIndex: 
defaultIndex];
                }
        }

<defaultKey> comes back as a reasonable looking UUID string.
<defaultIndex> comes back as 0.
<emailAddr> comes back as @"0x17C726C0" which is clearly bogus. I've checked my own entry in the Address Book app and it's fine. The initial "missing" email address is loaded correctly, but gets overwritten by the hex string.

Anyone any idea what's going on?

--Graham


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to