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
0
votes
1 answer

NSArrayController addObject/removeObject changes reference counts differently

I assumed that NSArrayController's addObject and removeObject would work similarly to analogues in NSMutableArray. However, it looks like addObject increases the refcount on its target object by 3, while NSArrayController:removeObject reduces the…
0
votes
1 answer

Adding an object to a binded NSTableView - Core Data application

I have an app that uses core data. The model of which has 3 Entities, all connected by 1-many relationships as so: |E1|<-->>|E2|<-->>|E3| My UI is essentially a 3-way vertical split pane, each with a tableview in. The way it works is that I have…
Alex
  • 3,031
  • 6
  • 34
  • 56
0
votes
1 answer

Problem getting selected row index in NSTableView with filter predicate

I'm not sure I'm phrasing this properly, but basically I do this in my main app delegate: Application *app = [[Application alloc] initWithApplication:fullPath] The Application class has an initWithApplication method that takes in the path of an app…
indragie
  • 18,002
  • 16
  • 95
  • 164
0
votes
2 answers

Iterate through NSArrayController in specific order

I need to iterate through an NSArrayController in a coredata model by a specific order. Lets say that my model has these columns: animal (string) name (string) age (int) and I would like to iterate trough the controller like this: for (animal *a in…
sharkyenergy
  • 3,842
  • 10
  • 46
  • 97
0
votes
1 answer

NSArrayController reallocating array?

I have an NSCollectionView whose content is bound to an NSArrayController's arrangedObjects. When I call addObject: on the array controller, it seems to reallocate the underlying array - I can observe the pointer changing addresses. This isn't…
0
votes
1 answer

NSTextField does not update calculated property using Core Data bindings

New to SO; my first question: Re: Core Data, document based app using bindings: I have an NSTableView bound to an NSArrayController, bound to an entity, LineItem, with several columns bound to the following LineItem attributes/properties: amount,…
0
votes
1 answer

osx, making tableview reloadable

I have another simple question I can not solve by myself. I have two xibs. main.xib for the user input and result.xib for the results. Xib2 starts when a button is pushed on input-xib. The button action (in AppDelegate.m): -…
JFS
  • 2,992
  • 3
  • 37
  • 48
0
votes
1 answer

cocoa bindings with c++ libraries

Is it possible to use bindings (NSArrayController etc) if you have to have a c++ in the model, ie all files in the model have .mm extension. Have built a small test program in pure Objective-C, which works OK, but when I try to build a program with…
0
votes
1 answer

Sort the contents of an NSScrollView, NSTableView, using Binding in ArrayController

I have an NSScrollView wich is bound with an ArrayController. I need to sort the content alphabetically. I've tried to do this with bindings but I can't find the right thing to bind. I used the following sortDescriptor on my…
0
votes
1 answer

Adding downloaded NSImage into an NSArrayController - AWS iOS Asynchronous S3 S3GetObjectRequest

I have a NSTableview with three columns 'Thumbnail','FileName' and 'Datemodified'. The file name column and date modified column is filled with the output of S3ListObjectResponse. While the 'Thumbnail' column image is loaded from the local directory…
DesperateLearner
  • 1,115
  • 3
  • 19
  • 45
0
votes
2 answers

[__NSCFString objectAtIndex:]: unrecognized selector sent to instance Error

I tried loading the contents of the bucket into a NSTableView using Arraycontroller. I ended uo with this error: -[__NSCFString objectAtIndex:]: unrecognized selector sent to instance 0x1006da970 Here is the code I used to check. -…
0
votes
1 answer

Custom NSManagedObject classes to add/remove Object from NSOrderedSet

I'm learning Cocoa and following an example in Aaron Hillegass's book (Chapter 32 Core Data Relationships) and can't get it working for my own app. I have a core data model that consists of a parent object with a to-many relationship to children but…
Bill
  • 10,323
  • 10
  • 62
  • 85
0
votes
1 answer

Dynamic NSCombobox

I'm creating an application in which I have several entities and now I need to filter the content of third combobox dynamically. I explain myself better. I have 3 combobox (building, floor and department), I would like first to show me all the…
0
votes
2 answers

NSButton inside tableCellView: how to use the "action invocation" for a View Based NSTableView/NSArrayController

For a View Based NSTableView/NSarrayController: how would I use the "action invocation" from a NSButton inside a tableCellView to change an attribute for an entity? I have the following setup: A "View Based" NSTableview with one column. A…
0
votes
1 answer

how to rebind nstableview IN COCOA

I have a NSTableView and a NSArrayController for the NSTableView. there is only one column in the table,"name" at first, user open one file, in the arrayController will be @[@{@"name":@"1"},@{@"name":@"2"}] after sometime, the user opened another…
YuDenzel
  • 413
  • 3
  • 16