Re: Adding Type-ahead to tableView
Re: Adding Type-ahead to tableView
- Subject: Re: Adding Type-ahead to tableView
- From: Daryn <email@hidden>
- Date: Tue, 26 Nov 2002 19:21:58 -0600
On Tuesday, November 26, 2002, at 06:24 PM, Jan Van Tol wrote:
Everything works great, except for one thing. When ever I hit return
to push the default button in my window, it just beeps at me. How can
I work this so that the return key will act normally?
Something similar to this should work:
- (void)insertNewline:(id)sender {
int row = [self selectedRow];
if (row != -1) {
[self editColumn:0 row:row withEvent:nil select:NO];
}
}
And a second question: Right now, in myTableView, I'm using [[self
dataSource] tableData] to get the array that my table is displaying.
tableData is a method I implemented in myTableView's data source. It
seems silly to me to have to get the data like that, there must be
some way to access what my table is displaying directly from
myTableView.
Failing that, what's the best way to get an array containing the
contents of myTableView?
Use the datasource's tableView:objectValueForTableColumn:row:? An
array is your chosen implementation detail, so there is no standard way
to obtain an array of the table's objects.
Daryn
_______________________________________________
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.