NSTableView newbie questions
NSTableView newbie questions
- Subject: NSTableView newbie questions
- From: email@hidden
- Date: Sun, 20 Jan 2002 14:52:24 -0600
Hello,
I'm getting started in learning cocoa and thick applications (after 8
years in web interfaces), and I have a few questions I'm hoping that I'm
hoping someone on this list will tolerate and enlighten me with answers.
1. After I double click in a cell, I can edit the text, hit return and
the datasource.tableViewSetObjectValueForLocation runs nicely. But then
it moves the focus to the next row and puts it edit mode. I want the
selection to go away (or at least stay on the same row in non-edit
mode). aTableView.deselectAll(null) was my guess, but no luck.
2. I have a button that adds a new object to the data source. Ideally,
I want it to move the new record into view, in edit mode, ready for me
to edit. But I can't move to the new row until the table has refreshed
itself, and aTableView.reloadData() seems to be an asynchronous call.
What's a good technique to accomplish this? I'd rather not create a
dialog box to prompt for the value before updating the tableview.
3. I'd like to be able to click on a row and hit the delete key to
remove the row. My perusal of the developer docs does not even give me
a starting point for this. I have an action that can take the rowIndex
and delete the row, but I don't know how to hook it up. I'm guessing it
has something to do with first responder, but I'm lost. Can someone
provide some pointers to where I should be reading about how to do this?
I'm using Java, for what it's worth.
Thanks for any help,
-benJ