• 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: making NSTableView firstResponder programmatically
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: making NSTableView firstResponder programmatically


  • Subject: Re: making NSTableView firstResponder programmatically
  • From: Michael Johnston <email@hidden>
  • Date: Sat, 29 Jun 2002 21:09:12 +0200

Doh! It now works.

The secret was to set the NSTextField to send action "only on enter" instead of "on end editing" I think this is because when it is set to on end editing, it sends selectKeyViewFollowingView: AFTER calling its action, even when the key pressed was enter and not tab.

Michael

On Saturday, June 29, 2002, at 08:30 PM, Michael Johnston wrote:

I can't seem to make an NSTableView firstResponder with IB or programmatically.

[[self window] makeFirstResponder:myTableView]; returns true, but the tableview does not actually get the focus, the next view on the keyview loop does. And when I selectRow and editColumn after calling makeFirstResponder, weird things happen (the selected row disappears)

I would really like to implement the following: when a user hits return while in a textField, a tableview becomes firstResponder, with the first row selected and in edit mode.

selectRow and editColumn works fine if the tableview is already firstresponder because it has been clicked on, but I can't seem to find any way to make the tableview firstresponder programmatically.

The only thing I've found with google is another person with the same problem a couple months ago, but no answer. Has anyone solved this?

Thanks,
Michael
_______________________________________________
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.

  • Follow-Ups:
    • Re: making NSTableView firstResponder programmatically
      • From: Bill Cheeseman <email@hidden>
References: 
 >making NSTableView firstResponder programmatically (From: Michael Johnston <email@hidden>)

  • Prev by Date: Re: ARGH Re: Accessor method article preview
  • Next by Date: Selecting submenu root
  • Previous by thread: making NSTableView firstResponder programmatically
  • Next by thread: Re: making NSTableView firstResponder programmatically
  • Index(es):
    • Date
    • Thread