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

How to change the value of an item when other item changes in NSTableView?

I have populated this NSTableView using binding from an NSArrayController https://www.dropbox.com/s/igx8ttdfvi2tt09/ss.png Now when the user changes say 480 (in column width) to 240 i want to change the Height value also like from 270 to 185…
0
votes
0 answers

Getting keypath of NSArrayController key through selected cell of NSTableView

I have NSTableView with connected NSArrayController. NSArrayController has some keys and they are represented with corresponding columns in NSTableView. I try to find the way to get the corresponding keypath of NSArrayController through selected…
0
votes
1 answer

NSArrayController automatically selects all new items on `add:` action

I have an NSArrayController which is bound to my NSTableView. The table view has the standard + / - buttons. When I press the + button which triggers the add: action of the NSArrayController the new item in the list will automatically be selected,…
Besi
  • 22,579
  • 24
  • 131
  • 223
0
votes
2 answers

How can I subclass NSArrayController to select a text field on add:

This is simple I am sure, but I am still very much learning. I have an NSTableView that is connected to an array controller to display coredata objects. The table is uneditable. When a single record is selected, I have a subview set to be made…
user2638932
0
votes
1 answer

NSTableView columns can't be sorted

I'm binding an NSTableView to an NSArrayController. For some reason, I can't sort the columns at all. Some columns don't even show the sort direction arrow. Some do show it, but clicking it just toggles the arrow direction, it doesn't actually sort…
jsd
  • 7,673
  • 5
  • 27
  • 47
0
votes
2 answers

Cocoa Mac app and NSTableView don't refresh with NSArrayController and NSManagedObjectContext

I'm developing a new Core Data app and I created an NSArrayController (Entity Mode) to make bindings, it works very well but when the SQLite store changes (changes come from other clients using TICoreDataSync library) I force a tableView reload with…
0
votes
3 answers

How to programmatically setObjectClass for NSArrayController

I'm having a problem with what should be a very simple thing. I want to create an NSArrayController and specify the class it manages. Problem is, I can't figure out the correct way to specify the Class in the setObjectClass method. I want to do…
Shawn
  • 717
  • 11
  • 31
0
votes
2 answers

Cocoa binding search field to tableview in a different nib

I've got a user interface that looks pretty much like iTunes. For purposes of encapsulation, the top area and the main table view are in separate classes with separate nibs. I want to bind the search field from the top view controller to the…
jsd
  • 7,673
  • 5
  • 27
  • 47
0
votes
1 answer

What is the difference between NSUserDefaultsController and NSArrayController?

I have happily used a "Array Controller" object in the interface builder. The binding worked like charm and everything works like magic. Because of that I took a look at the "User Default Controller" - thinking that it will work similarly as the…
user3351866
0
votes
1 answer

Binding NSMutableArray to NSPopUpButton and inserting new values

(This example project is here https://github.com/danieljfarrell/BindingToPopUpButtons) I'm just getting into binds, but I have an NSPopUpButton bound to a NSArrayController which is managing a content array in my AppDelegate (model) and all works…
Daniel Farrell
  • 9,316
  • 8
  • 39
  • 62
0
votes
1 answer

Displaying multiple values in NSTextField using bindings

I am having an NSTableView with a bound NSArrayController. When one or more rows are selected, I want to show the name of the selected rows in an NSTextField. If only one row is selected the value should be shown, if multiple rows are selected the…
Erik
  • 11,944
  • 18
  • 87
  • 126
0
votes
2 answers

What is the simple way to bind an NSMutableArray to a single Colum NSTableView

Is there a simple way to bind a NSMutableArray made up of Strings to a Single column NSTableView without creating any new classes?
0
votes
1 answer

How to observe a Core Data relationship before it gets actually changed?

I am trying to find a way of observing a Core Data relationship (more specifically the removed items of an unordered relationship) before it gets actually changed. You can imagine it as a "will change" notification known from other Cocoa APIs. The…
Lukáš Kubánek
  • 946
  • 1
  • 15
  • 27
0
votes
1 answer

Use an Array controller in different windows

I have an NSTableView in my MainMenu.xib thats bound to an array controller which in turn is bound to a mutable array in my app delegate. Everything is working correctly and I can edit the items in the tableview and add new objects to the array…
Ben
  • 3
  • 1
0
votes
1 answer

NSComboBox bound to NSArrayController not updating

I have an issue with bindings between an NSComboBox element and an NSArrayController. All bindings are setup in IB. The NSComboBox element has the following bindings: Content: bound to the NSArrayController instance, key: arrangedObjects Content…
Francesco
  • 1,840
  • 19
  • 24