Setting the focus into an NSTableView?
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/>