How can I save an address in the Mac Address Book?

How can I save the street address, Zip code and city in Mac Adressbook? Only the name, telephone and Email be transferred.

In the Xojo examples AdressBook.xojo_binary_project is under the CreateContactButton.Action Event

Is this a bug or missing feature?

You need to be more specific. Does it compile? Does it crash? Is there an Exception thrown, etc…

addresses are dictionaries internally.

Did you try the MBS Plugin classes for Addressbook?

The Xojo example AddressBook.xojo_binary_project doesn’t seem to work, so no need to advertise here…

@Eli Ott the app is running. The text “// This line does not seem to be working” is not mine, but is so in Xojo example.

@Christian Schmitz I have your plugin, but I’d like to do with the Xojo own board resources.

Quickly checked with the last version of RB (2012) and this comment was already there.

Personally I am particular to MBS add-ons and think it was well worth the money. They take a bit of getting used to and have a learning curve, but they are, in many ways, more effective than the stock Xojo abilities.

If I were doing this, I would use the MBS package, but that is just what I would do…

Why should the fact that the Xojo example doesn’t work stop Christian from hinting at a way to achieve what the OP needed?

Because it doesn’t answer the question.

Anyway, the issue is a different one. I had understood that the line would not compile or work – but it does. The comment has been added by the Xojo employee who created this example application. So the OP was about why this comment exists.

The example doesn’t use a AddressbookData, and I think it should. I tested this to make it possible to exchange addresses between our own system and the Mac addressbook. I think it should be:

    Dim address As New AddressBookAddress
    Dim Indata As AddressBookData
    contact.Addresses.Append(AddressBookData.LabelWork, address) //add an (empty) address
    address.StreetAddress = "PO Box 162181"
    address.City = "Austin"
    address.State = "TX"
    address.Zip = "78716"
    contact.Addresses.Append(AddressBookData.LabelWork, address) 

Great, that works. Thanks Alot.