cocoa-bindings

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

孤人 提交于 2019-12-03 06:36:48
问题 (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 pulling items out of Core Data An NSTableView rendering them Another NSTableView that when you click on a row in the first table, displays the details of that item Item 3 above was causing application crash, with the error: [(my NSManagedObject)

NSPopupButton in view based NSTableView: getting bindings to work

懵懂的女人 提交于 2019-12-03 03:26:17
Problem Description I'm trying to achieve something that should be simple and fairly common: having a bindings populated NSPopupButton inside bindings populated NSTableView. Apple describes this for a cell based table in the their documentation Implementing To-One Relationships Using Pop-Up Menus and it looks like this: I can't get this to work for a view based table. The "Author" popup won't populate itself no matter what I do. I have two array controllers, one for the items in the table ( Items ) and one for the authors ( Authors ), both associated with the respective entities in my core

What's the Difference between “Content Values” and “Content Objects”

穿精又带淫゛_ 提交于 2019-12-03 03:12:08
问题 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 Value s, and then Selected Object , Selected Value, and Selected Tag . Could someone please explain the difference between these? 回答1: Those are explained in the Cocoa Bindings Reference for NSPopUpButton, although that reference is not quite clear. Content is an array controller that provides elements to the popup button.

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

ε祈祈猫儿з 提交于 2019-12-03 02:26:17
问题 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 difficult to grasp the concept of exactly how they work. I know how to use the excellent PXSourceList as a fallback, but would really like to start using view-based source lists instead if at all possible. 回答1: You tagged this with the cocoa-bindings

What describes objective-C and Cocoa Bindings best?

半城伤御伤魂 提交于 2019-12-03 02:22:30
问题 I have trouble understanding Cocoa Bindings. Can someone explain me what this is all about, in an way that is humanly perceivable? 回答1: Bindings is a system for connecting your views to your controllers without writing a lot of glue code to make them explicitly talk to each other. All you have to do is set up properties in both classes* and hook up the binding in IB. The traditional approach is that the view has one or more outlets to talk to the controller (the most generic examples being

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

余生长醉 提交于 2019-12-02 21:10:18
(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 pulling items out of Core Data An NSTableView rendering them Another NSTableView that when you click on a row in the first table, displays the details of that item Item 3 above was causing application crash, with the error: [(my NSManagedObject) copyWithZone:]: unrecognized selector sent to instance Implementing that method (!) and putting a

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

一个人想着一个人 提交于 2019-12-02 17:21:54
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 difficult to grasp the concept of exactly how they work. I know how to use the excellent PXSourceList as a fallback, but would really like to start using view-based source lists instead if at all possible. You tagged this with the cocoa-bindings tag, so I assume you mean "with bindings." I whipped up a quick example. Start from a new non-document

What describes objective-C and Cocoa Bindings best?

旧城冷巷雨未停 提交于 2019-12-02 15:55:29
I have trouble understanding Cocoa Bindings. Can someone explain me what this is all about, in an way that is humanly perceivable? Bindings is a system for connecting your views to your controllers without writing a lot of glue code to make them explicitly talk to each other. All you have to do is set up properties in both classes* and hook up the binding in IB. The traditional approach is that the view has one or more outlets to talk to the controller (the most generic examples being delegate and target ) and the controller has outlets to talk to the views. When the controller updates the

Xcode 7: Binding an array controller to a radio button group

血红的双手。 提交于 2019-12-02 14:44:55
问题 I have a small set of objects from which the user should be able to select one using a radio button group. The objects are already bound to an array controller. Is there a way to bind that array controller to a radio button group so that additional radio buttons are generated dynamically? If possible, an IB solution is preferred. Example project: https://scriptreactor.com/collectionviewtest_radio.zip Goal is to be able to select one of the items "a", "b", "c", and have that selection

Xcode 7: Binding an array controller to a radio button group

▼魔方 西西 提交于 2019-12-02 11:21:40
I have a small set of objects from which the user should be able to select one using a radio button group. The objects are already bound to an array controller. Is there a way to bind that array controller to a radio button group so that additional radio buttons are generated dynamically? If possible, an IB solution is preferred. Example project: https://scriptreactor.com/collectionviewtest_radio.zip Goal is to be able to select one of the items "a", "b", "c", and have that selection available in the view controller. You can bind the button state through objectValue ( NSTableViewCell ) in a