Re: How many items can add into table view
Re: How many items can add into table view
- Subject: Re: How many items can add into table view
- From: Gregory Weston <email@hidden>
- Date: Mon, 21 Jan 2008 08:23:05 -0500
Yu Min wrote:
Hi list
Now I use cocoa's table view to show item, but I want to know how
many items can add into table view.
2 billion or more. Since table views don't store data - only display
it - the number of items is limited to the greatest value of
NSInteger (in 10.5, int earlier). And that limit exists only because
that's the return type for numberOfRowsInTableView:. As long as
whatever structure you're storing your data in doesn't have a lower
limit, you're probably fine.
You could test this for usability (because the scrollbar will be very
finicky) by implementing a simple data source that returns MAXINT
from numberOfRowsInTableView. and [NSNumber numberWithInt
(eger):rowIndex] from tableView:objectValueForTableColumn:row:.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden