I am trying to get the old and new values of the objects in my NSArrayController using KVO. The values passed into the change dictionary are nil though.
I have an NSArrayController and I have a class Model with a property name that use cocoa's @property and @synthesize to insure that they are KVO compliant.
@property (retain) NSString ...
Am I misunderstanding something about bindings? I bind (an NSArrayController's content) to an NSDictionary's "allValues" array, and it thinks it's empty. I bind to a random object with a property that I've set to be that same NSDictionary's "allValues" array, and it works fine.
Is this expected behavior, or am I doing something wrong? F...
Sorry for the clumsy title.
Imagine a simple UI to display the first names of a person's children...
As I initially only had one Person, I created an array controller and bound it to appDelegate.person1.children - this worked fine, as did binding a table column to display the first names.
However, I have since extended my program so t...
I've got a pretty standard setup: an NSArrayController whose contents are displayed in an NSCollectionView, and a pane of editable views bound to the array controller's selection (which is of course controlled by the collection view).
For some reason, when I bind an NSObjectController's contentObject to the array controller's selection,...
I am having an issue wrapping my head around how to hook up a few NSArrayControllers across two view controllers. I want to sync the selection in the source list table view to update the values in the second detail view controller.
I'm using the Cocoa Dev Central Build A Core Data Tutorial as the starting point, but have broke down ...
I Have an NSArrayController bound to a NSUserDefaults controller, with setSelectsInsertedObjects set to YES in Interface Builder, but when I click Add, the previously select object gets unselected, instead of selecting the newly added object.
What am I missing?
...
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 to iTunes, I am showing the same type of information in the table view whether a library or...
Hi folks,
I have the following situation:
There is one custom view inside of the first window that contains a NSTableView.
There is a second window which acts as a form for the current object behind the selection of the table view inside the first window.
Some more details:
I’ve implemented the setDoubleAction: behavior in the NST...
I've two TableViews (one SourceList and one Normal TableView). I'm not using ArrayControllers, just using:
- (id)tableView:(NSTableView *)aTableView
objectValueForTableColumn:(NSTableColumn *)aTableColumn
row:(NSInteger)rowIndex;
- (NSInteger)numberOfRowsInTableView:(NSTableView *)aTableView;
this to display the Row Conte...
I tried to find the answer of my question on the internet, but I could not.
I have a simple entity in Core data that has a Value attribute (that is integer) and a Date attribute. I want to define two methods in my .m file.
First method is the ADD method. It takes two arguments: an integer value (entered by user in UI) and a date (curr...
I am trying to populate a NSPopUpButtonCell with a list of strings. In -(init), I populate an NSArray with the values I want in the PopUp Button. How do I connect this to the NSArrayController I added in IB? Does my app delegate need an IBOutlet NSArrayController to connect to or is there a way to bind it?
Also, when I bind the NSArr...
I am struggling trying to perform what I would think would be a relatively common task. I have an NSTableView that is bound to it's array via an NSArrayController. The array controller has it's content set to an NSMutableArray that contains one or more NSObject instances of a model class. What I don't know how to do is expose the model i...
Hi,
I'm fairly new to the world of bindings in cocoa, and I'm having some troubles (perhaps/probably due to a misunderstanding).
I have a singleton that contains an NSMutableArray called plugins, containing objects of class Plugin. It has a method called loadPlugins which adds objects to the plugins array. This may be called at any poi...
I'm using a simple NSComparisonPredicate similar to: ("employeeDepartment != %@", department) where employeeDepartment is an optional, one-to-many relationship in Employees, and department is an NSManagedObject of Departments. When applied against the Employees entity, I'm getting different results from an NSArrayController vs an NSFetch...
Within Interface Builder I've got an NSTableView with two columns bound to a vanilla NSArrayController. The NSArrayController has its Content Array bound to an NSMutableArray in my application delegate. I've used further bindings to setup the addition and removal of rows via bindings (magic!).
The issue I'm running into now is that I'd ...
I've got a text field value bound to a key path that uses @sum. When the array controller is filtered, the text field updates properly, but extremely slowly, lagging the UI or outright beachballing after every key press (less so as the number of items in arrangedObjects decreases). There is no lag if I don't use @sum; I've narrowed it do...
I have a Core Data entity whose header file looks like this:
@interface MyEntity : NSManagedObject
{
}
@property (nonatomic, retain) NSNumber * index;
@end
And it's implementation file looks like this:
@implementation MyEntity
@dynamic index;
@end
Now, I have a piece of code that looks like this:
NSArray* selectedObects = [myE...
I've got an NSArrayController bound to a mutable array in my controller, which manages an array of my model objects. The array controller is bound to my UI. It works well.
Now I'm trying to manually observe when a value changes in my model in my controller class (basically I'm marking the changed model as "needsToSave" for later on, but...
I'm trying to limit the number of objects in an array controller, but I still want to be able to access the full array, if necessary. A simple solution I came up with was to subclass NSArrayController, and define a new method named "limitedArrangedObjects", that returns a limited number of objects from the real set of arranged objects. ...
I have core data app with an entity OBSERVATION that has as one of its attributes DEALNAME.
I want to reference through Interface Builder or by making custom modifications to an NSArrayController a list of unique sorted dealnames so that I can use them in a pop-up.
I have attempted to use @distinctUnionOfSets (and @distinctUnionOfArrays...