Re: Bindings or datasource for a large NSTableView
Re: Bindings or datasource for a large NSTableView
- Subject: Re: Bindings or datasource for a large NSTableView
- From: Hamish Allan <email@hidden>
- Date: Thu, 26 Jan 2006 15:22:59 +0000
On Thu, 26 Jan 2006 00:09:51 +0200, Dado Colussi wrote:
first post, quite new to Cocoa and Mac in general. I have an
external SQL database sitting somewhere with potentially large
tables. I should display data from the tables on an NSTableView. It
should be possible to perform sorting, searching and filtring on
the data. I don't know how to implement this efficiently with
NSArrayController and bindings.
I found a short discussion about a similar problem on this list
dated a few years back. Someone suggested implementing a cache-
boosted data source that makes direct queries to the database [1].
It would allow me to have the database sort the records for me as
well as to let me populate the table in a lazy manner (i.e. fetch
the first N rows and fetch more after a cache-miss).
I'd say this would be the way to go -- this is pretty much how
NSMetadataQuery works as far as I can tell. (-[NSMetadataQuery
results] returns a _NSMetadataQueryResultArray, whose -count and -
objectAtIndex: methods are simply proxies for the query's -
resultCount and -resultAtIndex: methods.)
Best wishes,
Hamish
_______________________________________________
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