FROM : Jonathon Mah
DATE : Wed Apr 20 01:19:46 2005
On 20 Apr 2005, at 07:11, John Fox wrote:
> I've been using ABPeoplePickerView in a panel, and I'm trying to
> figure out how to always have the cursor be active in the the search
> field (i.e. that the search field receives the focus). This is the way
> the people picker behaves in iChat. In my app however, after a user
> selects a record and the panel is closed, the next time it's opened
> the focus is no longer on the search field, but on the previously
> selected record. The only way to force the cursor into the search
> field is to use the tab key which is "non-obvious" to borrow a phrase.
> I've tried called deselectAll: and that doesn't have any effect.
> Further, there does not seem to be any public outlet for the search
> field in this view. Is there some trick, hidden or otherwise, that I'm
> missing
Doing a quick grep on the symbols brings up the method
-[ABPeoplePickerView _searchField], so (judging by the method name) you
should be able to use that to get a reference to the search field and
focus it. Obviously this is a private method, usual warnings, etc.
In case you're interested in how I found that, I used the command:
nm
/System/Library/Frameworks/AddressBook.framework/Versions/Current/
AddressBook | grep search
Hope this helps,
Jonathon Mah
<email_removed>
DATE : Wed Apr 20 01:19:46 2005
On 20 Apr 2005, at 07:11, John Fox wrote:
> I've been using ABPeoplePickerView in a panel, and I'm trying to
> figure out how to always have the cursor be active in the the search
> field (i.e. that the search field receives the focus). This is the way
> the people picker behaves in iChat. In my app however, after a user
> selects a record and the panel is closed, the next time it's opened
> the focus is no longer on the search field, but on the previously
> selected record. The only way to force the cursor into the search
> field is to use the tab key which is "non-obvious" to borrow a phrase.
> I've tried called deselectAll: and that doesn't have any effect.
> Further, there does not seem to be any public outlet for the search
> field in this view. Is there some trick, hidden or otherwise, that I'm
> missing
Doing a quick grep on the symbols brings up the method
-[ABPeoplePickerView _searchField], so (judging by the method name) you
should be able to use that to get a reference to the search field and
focus it. Obviously this is a private method, usual warnings, etc.
In case you're interested in how I found that, I used the command:
nm
/System/Library/Frameworks/AddressBook.framework/Versions/Current/
AddressBook | grep search
Hope this helps,
Jonathon Mah
<email_removed>
| Related mails | Author | Date |
|---|---|---|
| John Fox | Apr 19, 23:41 | |
| Carl Gieringer | Apr 20, 01:12 | |
| Jonathon Mah | Apr 20, 01:19 | |
| John Fox | Apr 20, 01:23 |






Cocoa mail archive

