Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


I am looking for a list view in Cocoa to handle a massive amount of data


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 aregee   Members   -  Reputation: 1026

Like
0Likes
Like

Posted 30 July 2014 - 01:59 PM

In my application, I am using a NSTableView that is connected to a NSArrayController.  In my case, I am loading absolutely everything into memory, which in itself is not really a problem.  It is really fast and responsive, but I am planning to use a database instead to make the data more persistent.

 

I am almost certain I remember a kind of view in the past, that you just specified how many items were in the view, so the view knew the amount to scroll, then the view would ask for the data it needed for the items that were visible, and discard everything else, if it wanted.  In this way, I don't need to keep everything in memory at once.

 

My problem is that I don't remember what it is called, nor can I find it, and lastly, I don't know what to search for.

 

I would probably not have much problems making such a thing myself, but it will be a lot more work. If there is something already existing, I'd rather use that.  Does anybody have any ideas?



Sponsor:

#2 swiftcoder   Senior Moderators   -  Reputation: 10360

Like
1Likes
Like

Posted 30 July 2014 - 08:18 PM

The old-school, programatic approach would be to continue using NSTableView, and just implement the NSTableViewDataSource protocol directly (which just involves returning the item count, and the individual items as requested).

 

The more modern and Mac'ish approach would be to define your data backend using Core Data, and then just bind your existing NSArrayController to the data model, at which point everything will Just Work™ with the NSTableView you already have.


Edited by swiftcoder, 30 July 2014 - 08:19 PM.

Tristam MacDonald - Software Engineer @Amazon - [swiftcoding]


#3 Buster2000   Members   -  Reputation: 1774

Like
1Likes
Like

Posted 31 July 2014 - 01:15 AM


I am almost certain I remember a kind of view in the past, that you just specified how many items were in the view, so the view knew the amount to scroll, then the view would ask for the data it needed for the items that were visible, and discard everything else, if it wanted. In this way, I don't need to keep everything in memory at once.

 

This is exactly what NSTableView does when used in conjunction with core data.



#4 aregee   Members   -  Reputation: 1026

Like
0Likes
Like

Posted 31 July 2014 - 08:55 PM

Ok, thanks for your answers!  Seems there is no more dwelling in getting into Core Data then.  I think I already have set up my project for that since I anticipated that I probably had to at some point.  Thank you for your replies!

 

Edit:

 

Yes, I see things like this:

@synthesize persistentStoreCoordinator = _persistentStoreCoordinator;
@synthesize managedObjectModel = _managedObjectModel;
@synthesize managedObjectContext = _managedObjectContext;

So I think I am ready to go.


Edited by aregee, 31 July 2014 - 09:00 PM.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS