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

Miguel de Icaza miguel at novell.com
Fri Jan 21 11:20:55 EST 2011

> 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.

In general, I agree that not having selectors exposed is a good idea,
for the reason stated above.   So any solution to the problem really
should avoid exposing the selector, not merely have a tool that
generates the selector and creates something that can be easily be
broken by a mistaken typo in the [Export] attribute inserted by

You will see that MonoMac goes trough great lengths to hide the
[Export] and the selector *as much as we were able to*.   When we
consider new scenarios, we need to be thinking terms of how to keep
these selectors behind the binding and not on tools that let you
expose those selectors without thinking about it.

Basically, you need to take a step back, and you need to propose a
solution that would work with C#'s type system.   Perhaps this
requires changes to the MonoMac runtime, and we need to figure out
what those changes are, and how we make those happen.

Adding a hack to MonoDevelop to auto-populate the methods is not a
solution, it is an ugly turd of a hack.


More information about the Mono-osx mailing list