Re: ABPeoplePickerView and multi-value properties
Re: ABPeoplePickerView and multi-value properties
- Subject: Re: ABPeoplePickerView and multi-value properties
- From: Nik Sands <email@hidden>
- Date: Tue, 11 May 2004 11:12:35 +1000
Yes, I agree, the documentation could be clearer, but a "multi-value"
is an ABRecord value which can have zero, one, or more values (eg, an
address, in my case).
In my people picker, I'm actually trying to pick an address value,
rather than a person (actually a person and an address for that person,
from their list of addresses). This actually works, as far as GUI
selection goes. So I've got my selection settings correct: I can
actually click on things in the people picker, and get the desired
results in the GUI. Ie, the person I click on gets selected, and if
that person has multiple addresses, I can click on any one of their
addresses to get it selected.
However, even with one (or more) of a person's addresses successfully
selected, the "selectedValues" method still returns NULL. And
selecting a different address (or a different person) does not appear
to send the notification
"ABPeoplePickerValueSelectionDidChangeNotification".
I have confirmed that the displayedValue is actually the address, as
required by the "selectedValues" method (and as is obvious in the GUI).
If you can shed any light on this behaviour, I'd be grateful.
Thanks,
Nik.
On 11 May 2004, at 10:31 AM, Robert Goldsmith wrote:
My problem is with the Address Book API: I cannot get 2 of the
ABPeoplePickerView methods to work:
- (NSArray *)selectedValues
ABPeoplePickerValueSelectionDidChangeNotification
My problem with this is that it is not clear to me what a 'value' is.
My assumption is that if a record has two items of the same type, you
can select neither, one or many of them, depending on what the
valueSelection setting is. I came to this conclusion because there is
also a selectedRecords method which is for accessing multiple selected
person or group records (selected by the user). Values are something
each record has, I think.
Therefore, my questions:
1) You really mean you wish to access the list of multiple 'values'
(e.g. email addresses?) in a record?
2) You are setting the correct valueSelectionBehaviour so as to allow
the selection of multiple values for a field
I am intrigued as to where this is useful as I have never played with
the peoplePicker class. My experience of the Address Book is writing a
'plugin' to manage gpg/pgp keys from within the Address Book :)
Robert
---
GnuPG public key:
http://www.Far-Blue.co.uk
========================================================
NIK SANDS - Systems Administrator
IT Services
University of Tasmania, Australia
Phone: 61-3-63243732 (BH)
AIM: brassnix
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.