• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: ABPeoplePickerView: setting focus on the search field: (Solved: though inelegantly)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ABPeoplePickerView: setting focus on the search field: (Solved: though inelegantly)


  • Subject: Re: ABPeoplePickerView: setting focus on the search field: (Solved: though inelegantly)
  • From: John Fox <email@hidden>
  • Date: Tue, 19 Apr 2005 16:23:12 -0700

Hi Carl:

Thanks for getting back to me.

In iChat, when you go to add a new buddy to your buddy list, what you're looking at is a panel with an ABPeoplePickerView This is an Apple provided class which is available from an IB palette. While it's a very useful palette, there sure seem to be some bugs in this class that have been discussed in this list.

At any rate, by poking around a little more, and looking at ABPeoplePickerViews's subviews, I found that one of them is an NSTextField subclass called ABSearchField. So, I solved my problem with brute force by calling selectText: on that object ach time before loading my panel. I would prefer not to have to do this, but for now it gets me the behavior I need.

John

On Apr 19, 2005, at 4:12 PM, Carl Gieringer wrote:

John,

What is the "people picker"? Do you mean the "Add a Buddy" sheet?

Maybe you should subclass NSPanel and override makeKeyAndOrderFront and orderFront and any related methods, and then within those methods call makeFirstResponder: (NSWindow) or accepts/becomeFirstResponder (NSResponder) for your search field. Then call super's implementation.

On Apr 19, 2005, at 13:41, John Fox wrote:

Hello:

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

Any help greatly appreciated.

John

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >ABPeoplePickerView: setting focus on the search field (From: John Fox <email@hidden>)
 >Re: ABPeoplePickerView: setting focus on the search field (From: Carl Gieringer <email@hidden>)

  • Prev by Date: Re: ABPeoplePickerView: setting focus on the search field
  • Next by Date: Re: Feature suggestions for easier debugging of Cocoa Bindings.
  • Previous by thread: Re: ABPeoplePickerView: setting focus on the search field
  • Next by thread: Re: ABPeoplePickerView: setting focus on the search field
  • Index(es):
    • Date
    • Thread