[Mono-osx] [MonoMac] "Apply Protocol to Class"

Duane Wandless 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:

> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-osx/attachments/20110121/184f56e8/attachment.html 

More information about the Mono-osx mailing list