There is no way to bind to custom controls in nib editor

Originator:aufflick
Number:rdar://17015665 Date Originated:23/5/14
Status:Open Resolved:
Product:Developer Tools Product Version:5.1.1
Classification:UI/Usability Reproducible:Always
 
Summary:
I use Cocoa Bindings extensively in a number of Mac apps. I love Cocoa Bindings. I tell everyone I know to use Cocoa Bindings and xibs wherever possible.

Unfortunately though I want to replace a load of NSTextFields with a custom control which I would like to implement as a view.

There is no way of dropping a custom view into my bindings-heavy application without writing an enormous amount of error prone glue code - whether manually setting up all the bindings after nib load or manually observing/reading/setting the values.

Of course in days gone by I could have written an IBPlugin and not only saved myself a lot of effort and reduced the chance of bugs both now and in the future, I could have published the IBPlugin online and helped a lot of other Mac developers do the same (and of course a lot of people unfamiliar with AppKit and NSCells etc. are writing Mac Apps these days, and some of them could use some help!)

This is not just another "IBPlugins please" radar (although I would be very happy to see an IBPlugin type api return) but more specifically any mechanism to indicate that a particular view exposes certain bindings - this wouldn't have to be a full IBPlugin, it could either just be a simple plist or it could even be a class method that returns a dictionary or something.

Cocoa Bindings are what makes Cocoa rapid development shine, but they are now less useful than they could be.

Steps to Reproduce:
1. Try to think of a good way to do bindings with custom views
2. Fondly remember IBPlugins

Expected Results:
There would be an easy and magical way to drop a custom view in place of a standard control in a bindings-based app.

Actual Results:
Sadness.

Version:
Version 5.1.1 (5B1008)

Notes:
I really really hope one of the "To Be Announced" Tools sessions at WW is an even better take on IBPlugins!

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!