Re: How to set a default row in NSTableView?
Re: How to set a default row in NSTableView?
- Subject: Re: How to set a default row in NSTableView?
- From: Andy Lee <email@hidden>
- Date: Tue, 21 Jun 2005 22:49:37 -0400
On Jun 21, 2005, at 9:23 PM, Mark Dawson wrote:
My main problem/issue is knowing WHEN my data source is populated.
It sounds like you're imagining that the table view gets "loaded up"
with data. That's not how it works. The only thing the table view
"holds on to" is the connection to the data source. It asks the data
source for bits of information only on an as-needed basis when the
time comes to display itself. For example, the table view doesn't
call -tableView:objectValueForTableColumn:row: for every single cell
-- only the ones it needs to display. And it doesn't maintain its
own array of cell values; rather, it asks the data source for cell
values one by one, and only holds on to each cell value long enough
to display it.
The only thing you probably need to do in your -awakeFromNib is call
either -noteNumberOfRowsChanged or -reloadData, to make sure the
table view knows the data source may have a different number of rows
and/or cell values than the last time it checked. Then you can
select whatever rows you want.
--Andy
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden