• 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
Setting the firstResponder in a view
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Setting the firstResponder in a view


  • Subject: Setting the firstResponder in a view
  • From: Andre Masse <email@hidden>
  • Date: Sat, 18 Jun 2011 16:51:08 -0400

Hi List,

I've been banging my head on this for awhile... I'm using a non document, non core data application. At this point this is a fairly common (I think) master/detail single window design. The window has a NSTabView with the master on one tab and detail on another, and a SourceView (like Mail) on the left side. This application is a front end to a PostgreSQL database.

The common use case is:
1- user select a database table on the source view which sends a query to the backend
2- result is shown on the tableView
3- user select a row and click a button or double-click to see the detail view.

Now, although I've set "nextKeyView" for all textFields, I just cant set focus on the NSTextField that I want to be first responder... It's always the topmost field that get the focus first. I tried to put [window makeFirstResponder:myFirstResponderField] everywhere I could think of without success. Since when the window appear on screen none of the views are present, I cant set the initialFirstResponder on the detail view, which is probably why my fancy key view loop is ignored.

The only thing that works is using a button on the detail view which calls makeFirstResponder:myFirstResponderField on the window. Obviously, this is not an ideal solution...

I'm probably missing something obvious and feel free to call me an idiot for overlooking this :-)

Thanks and Cheers,

Andre Masse



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Setting the firstResponder in a view
      • From: Andre Masse <email@hidden>
  • Prev by Date: Porting ResEdit Text Resources to OS X
  • Next by Date: Re: Tab Bar iPad App With Table View(Conrad Shultz)
  • Previous by thread: Re: Porting ResEdit Text Resources to OS X
  • Next by thread: Re: Setting the firstResponder in a view
  • Index(es):
    • Date
    • Thread