addressBook returns mismatched contact fields and labels

I just started working with addressBook. There’s a pretty basic issue I’m having. Using code modified from the demo sample, this is my onComplete handler returning from a selection of a contact in the showPopup:

    local function onContactPopupComplete( event )         print( "event.name:" .. event.name );         print( "event.type:" .. event.type );         if event.data then             for k, v in pairs( event.data ) do                 print( k .. ": " .. v )             end         end     end

The problem is, the printout of k,v pairs in event.data has things like:

phoneIphone: (number value is the contact’s home number - wrong!)

phoneHome: (work number - wrong!)

phoneMobile: (cell number - correct)

homeEmail: (work email - wrong!)

workEmail (home email - wrong!)

This happens consistently, always returning the same wrong pairings of keys and values. It happens with all or most contacts. It also happens with the email address fields.

Anyone seen this? Any ideas?

Hi @RealHandy,

I’ll try to do some testing on this today or tomorrow. By the way, do your contacts have multiple entries of the “same type” in them? For example, 3 entries for “mobile” and 2 entries for “work” and so forth?

Brent

Brent, I don’t have multiples under the same type. I have a mobile, home, work, maybe another for phones, and home and work for email. It happens for contacts that have different types, but those are the main ones, no dups. Thanks!

Hi @RealHandy,

I’m getting odd results too. Let me look further into this…

Thanks,

Brent

Hi @RealHandy,

Can you please file a bug report for this so it’s properly logged into our tracking system?

http://developer.coronalabs.com/content/bug-submission

Thanks,

Brent

Bug submitted.

You should have gotten an email with a bug case ID # in it.  Can you post it here?

Thanks

Rob

Yep, It’s 39658.

Hi @RealHandy,

I’ll try to do some testing on this today or tomorrow. By the way, do your contacts have multiple entries of the “same type” in them? For example, 3 entries for “mobile” and 2 entries for “work” and so forth?

Brent

Brent, I don’t have multiples under the same type. I have a mobile, home, work, maybe another for phones, and home and work for email. It happens for contacts that have different types, but those are the main ones, no dups. Thanks!

Hi @RealHandy,

I’m getting odd results too. Let me look further into this…

Thanks,

Brent

Hi @RealHandy,

Can you please file a bug report for this so it’s properly logged into our tracking system?

http://developer.coronalabs.com/content/bug-submission

Thanks,

Brent

Bug submitted.

You should have gotten an email with a bug case ID # in it.  Can you post it here?

Thanks

Rob

Yep, It’s 39658.