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
37
votes
4 answers

Can you manually implement Cocoa bindings?

I've had a crack at implementing bindings for my own NSView subclass. It works, but there are problems with retain cycles when binding to File's Owner from a nib file. After reading into it a little, I discovered that Apple had the same problem a…
Tom Dalling
  • 23,305
  • 6
  • 62
  • 80
36
votes
3 answers

Cocoa bindings for the Go language

Is it possible to write macOS/Cocoa applications in Google Go? Is there a Go-Obj-C bridge? (it seems to me that Obj-C dynamism would be a great fit for Golang's interfaces) Can I at least link the two together and make them talk to each other via…
Kornel
  • 97,764
  • 37
  • 219
  • 309
35
votes
1 answer

Is there any technical/conceptual reason why iOS does not support Cocoa Bindings?

Cocoa for Mac OS X support Cocoa Binding technology, reducing need of glue code between your views and your models. Recreating Cocoa Bindings on top of KVC on KVO seems doable with the help from cocotron source code. Is there any technical or…
Olivier Tabone
  • 1,081
  • 8
  • 6
32
votes
4 answers

When should I remove observers? Error about deallocating objects before removing observers

I am trying to use key-value observing in one of my classes. I register the observers in the init method and remove/deregister them in the dealloc, but I get the following error which seems to occur before my dealloc method gets called, according to…
30
votes
9 answers

"[something copyWithZone:]: unrecognized selector sent to instance" when using Bindings / Core Data

(self asking and self-answering because I spent hours on the web looking for this, and most of the resources all say "I solved it in the end" without giving an explanation) I had a very simple Core Data + Bindings application: An NSArrayController…
Adam
  • 32,900
  • 16
  • 126
  • 153
21
votes
2 answers

What describes objective-C and Cocoa Bindings best?

I have trouble understanding Cocoa Bindings. Can someone explain me what this is all about, in an way that is humanly perceivable?
Thanks
  • 40,109
  • 71
  • 208
  • 322
20
votes
2 answers

What's the Difference between "Content Values" and "Content Objects"

I'm exploring bindings right now, and have an NSPopUpButton - It presents me a number of options for bindings under Value Selection - Content, Content Objects, Content Values, and then Selected Object, Selected Value, and Selected Tag. Could…
Vervious
  • 5,559
  • 3
  • 38
  • 57
19
votes
1 answer

Binding a NSArrayController to a NSPopupButton & NSTextField

What I want to accomplish seems like it should be fairly straightforward. I have placed a sample project here. I have a NSArrayController filled with an array of NSDictionaries. [[self controller] addObject:@{ @"name" : @"itemA", @"part" : @"partA"…
ericg
  • 8,413
  • 9
  • 43
  • 77
17
votes
2 answers

Example of how to implement a view-based source list (NSOutlineView) using Cocoa Bindings?

Has anybody found a clear, concise example or guide on how to implement a source list using the view-based NSOutlineView introduced in Lion? I've looked at Apple's example project, but without any sense of direction or explanation, I'm finding it…
John Wells
  • 1,139
  • 1
  • 10
  • 27
16
votes
4 answers

What exactly is a binding?

I have been seeing the term "binding" and "live-binding" more and more recently, especially in JavaScript frameworks like Ember.js, Can.js, Knockout.js, and Backbone.js, and more traditionally, in Cocoa and Objective-C, and wonder what exactly a…
nonopolarity
  • 146,324
  • 131
  • 460
  • 740
16
votes
2 answers

Cocoa application architecture on Mac OS X

I'm getting back in to Cocoa development on the Mac after a long stint doing iPhone work. My previous experience with Cocoa on the Mac has just been dinky little tools. I'm looking to build something serious. Looking at a modern Cocoa application…
jbrennan
  • 11,943
  • 14
  • 73
  • 115
15
votes
4 answers

Binding a custom NSView: Does it demand creating an IBPlugin?

I have created a subclass of NSView to draw an image as a pattern: @interface CePatternView : NSView { NSImage* image; id observableObjectForImage; NSString* keyPathForImage; } @end I implemented the following to expose…
Renaud Pradenc
  • 1,221
  • 2
  • 8
  • 9
15
votes
5 answers

What are the reasons for subclassing NSArrayController?

I am trying to improve my KVC/KVO/Cocoa-Bindings-fu and was wondering what could be the reasons to subclass the NSArrayController?
Eimantas
  • 48,927
  • 17
  • 132
  • 168
15
votes
1 answer

Using an NSArrayController in Multiple Storyboard Scenes

I have a Mac document-based Core Data application that uses storyboards. The storyboard has the following layout: Window Controller Split View Controller Table View Controller Text View Controller My Core Data model contains a…
Swift Dev Journal
  • 19,282
  • 4
  • 56
  • 66
14
votes
2 answers

Why would I use NSObjectController?

Although I have searched for many information about Cocoa Bindings, I still remain relatively unsatisfied with information I have and got. It seems that topic is somewhat troublesome for many and many are just avoiding this pattern, which I believe…
mbpro
  • 2,460
  • 3
  • 22
  • 37
1
2 3
64 65