Re: Custom view and array bindings
Re: Custom view and array bindings
- Subject: Re: Custom view and array bindings
- From: Jim Geist <email@hidden>
- Date: Tue, 13 May 2014 22:17:05 -0700
Ok, thanks. The rest of my UI is set up with bindings to standard views, but it certainly looks easier to do what you suggest. And I assume if I adhere to KVC when I change things, it'll playing nice with the bound controls.
Sent from my iPad
> On May 13, 2014, at 10:07 PM, Quincey Morris <email@hidden> wrote:
>
>> On May 13, 2014, at 21:14 , Jim Geist <email@hidden> wrote:
>>
>> Can anyone point me at sample code and/or docs around implementing bindings to an NSArrayController from a custom view (i.e. what a control like NSTableView might do under the covers?)
>
> AFAIK, the only documentation is here:
>
> https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/CocoaBindings/Concepts/HowDoBindingsWork.html
>
> but it’s extremely out of date, and was fairly hard to follow even when the screen shots matched the actual OS (somewhere around 10.4).
>
> I’d recommend you don’t implement a custom binding at all. Custom bindings were only really useful when they were reusable in IB (that is, in Xcode 3, which supported IB plugins), because if you are doing it all in code, you may as well just write code for a two-way observation/update mechanism, without packaging it as a binding. Any custom binding you implement now can’t be used directly in IB.
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden