Questions tagged [nsarraycontroller]

on Mac OS X, NSArrayController is a bindings compatible class that manages a collection of objects

NSArrayController is a Cocoa class intended to bridge an array (instance of NSArray or its subclasses) and a suitable view, for instance a table view.

It provides a simple interface to add, remove, filter and sort the array, as well as the necessary bindings to interface these functions to Cocoa actions.

More information in the official docs

532 questions
8
votes
2 answers

Create group rows in NSTableView using CoreData backed NSArrayController

Say I have a bunch of Article objects stored within the core data model. Each article maintains, a reading progress attribute which denotes how much of the article has been read by the user. Once the user has read the article fully, the article is…
Mutahhir
  • 3,812
  • 3
  • 21
  • 26
8
votes
1 answer

Scroll NSTableView to selection

OK, this is my situation : I have an NSMutableArray bound to an NSTableView, via an NSArrayController. I'm manipulating the table view's selection (trigger by keyboard), using NSArrayController's selectNext: and selectPrevious: The thing is : The…
Dr.Kameleon
  • 22,532
  • 20
  • 115
  • 223
7
votes
1 answer

Programmatically retrieving the selected object of an NSArrayController

When I use an NSArrayController with instances of NSManagedObject, I was under the impression that the following would give me its selected object: [myArrayController selection] However, this gives me an instance of some private NS Proxy…
Roger
  • 4,737
  • 4
  • 43
  • 68
7
votes
5 answers

How should I remove all items from an NSTableView controlled by NSArrayController?

I'm using an NSArrayController, NSMutableArray and NSTableView to show a list of my own custom objects (although this question probably applies if you're just showing a list of vanilla NSString objects too). At various points in time, I need to…
Slacker
  • 460
  • 1
  • 4
  • 10
7
votes
0 answers

NSArrayController Entity Attribute Mysteriously Dropped

I have an NSArrayController bound to a Core Data entity — Channel. I have a method that updates the entity after a user changes the title of the Channel: NSManagedObjectContext *localContext = [NSManagedObjectContext…
Aaron Vegh
  • 5,217
  • 7
  • 48
  • 75
7
votes
1 answer

NSCollectionView draws nothing

I'm trying to set up an NSCollectionView (I have done this successfully in the past, but for some reason it fails this time). I have a model class called "TestModel", and it has an NSString property that just returns a string (just for testing…
7
votes
1 answer

Make NSTableView row editable when adding object with NSArrayController

I have a table column of NSTableView bound to to an NSArrayController in Interface Builder. The array controller is bound to Shared User Defaults Controller for the Content Array. I had to select Handles Content As Compound Value to make adding…
6
votes
1 answer

NSManagedObject Not Reflecting Changes After Background Thread NSManagedObjectContextDidSaveNotification

I am having trouble with an NSManagedObject not reflecting the changes made to a persistent store after a background thread has saved it's context. The Setup In a simple test application I have a single window that lists all of the objects in my…
6
votes
1 answer

How to bind the selection of the NSTableView to the NSArrayController

I just want to be able to use the the methods of the nsarraycontroller called remove: and add:
lbrndnr
  • 3,361
  • 2
  • 24
  • 34
6
votes
1 answer

How to make Deep Copy of NSManagedObject in Core Data

I am trying to make a duplicate of an existing NSManagedObject and related sub-objects in Core Data. I can't seem to find an easy way to do this. I have an NSArrayController that is populated from a Core Data database. I want to take the object at…
jschmidt
  • 2,898
  • 3
  • 24
  • 27
6
votes
1 answer

Core Data crash report: sqlite3VdbeHalt in loading array controller

I needed some help figuring out what might be going on in this crash report. This is a un-reproducible problem for me, but some users are running into this crash repeatedly at launch. When the app launches, I load a nib which contains an…
Z S
  • 7,039
  • 12
  • 53
  • 105
6
votes
1 answer

How do I bind an iTunes style source list to an NSTableView using Core Data?

I have an iTunes style interface in my application: Source list (NSOutlineView) on the left that contains different libraries and playlists with an NSTableView on the right side of the interface displaying information for "Presentations". Similar…
Austin
  • 4,638
  • 7
  • 41
  • 60
6
votes
3 answers

Displaying row index in an NSTableView bound to NSArrayController

I have an NSTableView which is bound to an NSArrayController. I would like to have one of the table columns showing the index of the table row. This is easy enough to do when you implement NSTableDataSource yourself but I can't figure it out with a…
Eyal Redler
  • 438
  • 6
  • 18
6
votes
3 answers

What is the Cocoa Touch equivalent to NSArrayController?

Been starting to work with Core Data a bit, and while I've figured out how to use it in regular Cocoa applications, it seems it works a bit differently in Cocoa Touch. How do you bind entities to objects such as table cells in Cocoa Touch?
Kaji
  • 2,220
  • 6
  • 30
  • 45
6
votes
2 answers

Finding a specific element in an NSArrayController

I've got an NSArrayController that contains a few elements. These elements has got a few attributes like 'name', 'interformation' etc. What i want is simply to find an element in the NSArrayController which has the name attribute set to, lets say,…
Mads Hartmann
  • 690
  • 7
  • 12
1
2
3
35 36