• 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 focus into an NSTableView?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Setting the focus into an NSTableView?


  • Subject: Setting the focus into an NSTableView?
  • From: Matt Ridley <email@hidden>
  • Date: Thu, 14 Jun 2001 01:57:54 +0100

Hi folks,

I have an NSTableView which displays within a sheet. When the sheet is run
modally, I set up my table with its data source and so on, and use the
selectRow:byExtendingSelection: selector to select the first row.

However, the table still doesn't seem to have the keyboard focus, despite
the first row being visually selected. I need to click into the table once
before the cursor keys will allow me to move from one row to another.

Is there a way I can programmatically place the keyboard focus into the
table after I've selected the first row? I tried using lockFocus: but I
receive these errors:


*** Assertion failure in -[NSTableView lockFocus], NSView.m:2038

lockFocus sent to a view whose window is deferred and does not yet have a
corresponding platform window



Thanks for any help. :-)


Best,
-Matt

--
Matt Ridley
Scotland Software
<http://www.scotlandsoftware.com/>


  • Follow-Ups:
    • Re: Setting the focus into an NSTableView?
      • From: Tom Waters <email@hidden>
  • Prev by Date: Re: Subclassing NSTextView and characters with diacritical marks
  • Next by Date: Re: Cocoa, a complete Mac OS X API?
  • Previous by thread: Re: Subclassing NSTextView and characters with diacritical marks
  • Next by thread: Re: Setting the focus into an NSTableView?
  • Index(es):
    • Date
    • Thread