Questions tagged [cocoa-bindings]

Cocoa bindings is Apple’s implementation of the Model-View-Controller design pattern for Mac OS X applications. It provides technologies that automate the synchronisation of domain data and the user interface elements that present them.

975 questions
0
votes
1 answer

Making a table's display dependent on the selection in another table in Interface Builder

I've got a window set up with two NSTableViews. In Core Data I have two entities set up, one of them containing members of the other, larger grouping (e.g. cars and manufacturers). I've got entry pages set up for each entity and they play nicely…
Kaji
  • 2,220
  • 6
  • 30
  • 45
0
votes
1 answer

Why doesn't my simple Cocoa binding work?

Cocoa bindings, KVC, and KVO are starting to make my head hurt. All I want to do is have an NSTextField's value bound to the value of a property of my view controller. Could someone tell me where I'm going wrong? Any help would be greatly…
Ben Stock
  • 1,986
  • 1
  • 22
  • 30
0
votes
1 answer

Sharing NSArrayController Between Nibs

I have an Core Data-based iTunes-like app I'm building that has an NSTableView in the main window and allows the user to select items in the table view and perform a "get info", like in iTunes. Currently I'm working on the single-item get info…
Chuck
  • 4,662
  • 2
  • 33
  • 55
0
votes
0 answers

how to bind all corresponding elements of several NSArrays

How do I bind all corresponding elements of several arrays? Wendt's book Cocoa shows an example binding a property, a slider, and a textfield in IB. Change any one and the other two track its value. It's very simple. Wendt strongly makes the point…
j yrez
  • 243
  • 1
  • 3
  • 11
0
votes
1 answer

Tinkering under the hood with Bindings in Xcode

Let's take two Core Data entities, set up as follows: Entity A: Car Attributes: year model Relationships: manufacturer (<<-> Manufacturer) Entity B: Manufacturer Attributes: name country Relationships: cars (<->> Car) Now,…
Kaji
  • 2,220
  • 6
  • 30
  • 45
0
votes
2 answers

Binding inside a NSTableCellView

I'm using a NSOutlineView view based and i want to bind a NSSlider and a NSTextfield to a NSDictionary key (@""duration"). The dictionary is a property of my NSTableCellView subclass. I'm facing an error when trying to setup the binding : The error…
Elfoiros
  • 468
  • 1
  • 7
  • 18
0
votes
0 answers

How to use KVO as an alternative to custom delegates

I am an iOS programmer. I just started learning coding for MAC OSX . But now I am having tough time coding for MAC OSX . The terms KVO and Bindings making my life tougher. There are document available but none of the document gives complete idea to…
Raj
  • 1,119
  • 1
  • 15
  • 32
0
votes
1 answer

Cocoa bindings - get @sum for an attribute for all children

I've been trying to get this to work for a while now. In my Core Data model I have: Entity Company has a one to many relationship with Employee (employees) Company.employees Employee.age Using bindings I would like to show the sum of age for all…
Mikael
  • 3,572
  • 1
  • 30
  • 43
0
votes
2 answers

Make NSTextField update its bound value when setting its string value programmatically

I have an NSTextField bound to a key in the user defaults. When I press enter or leave the field the bound value is properly updated (I have an observer for it). However when I programmatically set the value of the text field the bound value is not…
Mike Lischke
  • 48,925
  • 16
  • 119
  • 181
0
votes
1 answer

Notifying cocoa bindings system when code changes a property by instead of the interface

I'm writing a countdown timer and instead of calling -[NSTextField setDoubleValue:secondsRemaining] on each tick, I'd like to bind the secondsRemaining property to an interface element via an object controller. The problem with this is that…
Will White
  • 15
  • 3
0
votes
2 answers

Interface Builder won't connect button, but the tutorial says it should work

I've been trying to learn Core Data, and browsing through questions on Stack Overflow lead me to a recommendation that I try the tutorial on Core Data over at Cocoa Dev Central (Link). Everything is making sense so far in the tutorial, but when I…
Kaji
  • 2,220
  • 6
  • 30
  • 45
0
votes
1 answer

Apple's Sketch Source code NSArrayController Binding

I've been pulling my hair out over this for ages, in Apple's source code for their Sketch App, available here: developer.apple.com/samplecode they are binding an NSArrayController to an Array in the NSDocument. When they do this in the NSView of the…
Chris
  • 2,739
  • 4
  • 29
  • 57
0
votes
1 answer

Cocoa Bindings & Core Plot

I have a pie chart working using the datasource and delegate methods for core plot, however I'm now trying to use bindings and running into some issues. I using the following code to bind to the arraycontroller: [graph addPlot:pieChart]; // add…
Cory
  • 2,302
  • 20
  • 33
0
votes
1 answer

How do i bind to a NSString?

This question was asked before, but its not answered. I can bind to objects like so: [[aCellView textField] bind:@"stringValue" toObject:myObject withKeyPath:@"text" …
Just a coder
  • 15,480
  • 16
  • 85
  • 138
0
votes
1 answer

Core Data Search [Cocoa Bindings]

I have a project that has a Entity called : Verse. The Verse (entity) has a Attribute called : VerseContent (String). I have it successfully linked to a Table View and I have a Search Bar on the top. The Table View is binded to VersesArrayController…