[Mono-osx] [MonoMac] "Apply Protocol to Class"
Miguel de Icaza
miguel at novell.com
Fri Jan 21 10:55:13 EST 2011
Hello,
> I ran into a usage pattern that seems common. In Interface Builder define
> an NSTableView and an NSArrayController. Set the NSArrayController as the
> outlet for the NSTableView's dataSource and delegate. Then specify the
> NSArrayController to be a custom class.
So I was looking into this, and the recommended use case for the
NSArrayController is not to set it as the delegate/data source as you
described, but instead to use Bindings (KVO/KVC) to hook up the data,
and this would require no intervention on your end for this, nor
implementing the protocols like that.
http://www.cocoadev.com/index.pl?NSArrayController
And:
http://www.cocoabuilder.com/archive/cocoa/196362-beyond-mv-and-one.html#196372
Miguel
More information about the Mono-osx
mailing list