[Mono-osx] [MonoMac] "Apply Protocol to Class"
duane at wandless.net
Fri Jan 21 11:02:15 EST 2011
Which is why I added:
I do think this usage pattern extends beyond this example. You can set the
> dataSource/delegate to be the File's Owner, etc. One of the benefits of
> Cocoa is that any object can implement a selector. MM solves this with the
> Export but again you have to know the selector. Providing a means to easily
> add the selectors for a given protocol to a class would be very ideal.
So I think providing a solution for this need is something to consider.
Especially as the MM user population grows. The selectors are cumbersome.
A missed : or typo and nothing works. So providing a nice means to do this
is a win for the user base going forward.
On Fri, Jan 21, 2011 at 10:55 AM, Miguel de Icaza <miguel at novell.com> wrote:
> > I ran into a usage pattern that seems common. In Interface Builder
> > an NSTableView and an NSArrayController. Set the NSArrayController as
> > 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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-osx