[Mono-list] [MonoDevelop] ANNOUNCE: Mono.Addins 0.1

Lluis Sanchez lluis at ximian.com
Tue Mar 27 12:34:17 EDT 2007


El dt 27 de 03 del 2007 a les 17:05 +0200, en/na "Andrés G. Aragoneses
[ knocte ]" va escriure:
> Lluis Sanchez escribió:
> >>> I'm pleased to announce the release of Mono.Addins.
> >>>
> >>> Mono.Addins is a generic framework for creating extensible applications,
> >>> and for creating libraries which extend those applications.
> >>> [...]
> >> Hi Lluis, does it support the reload of an addin, if its assembly is 
> >> updated, without restarting the whole application?
> >>
> >> If yes, is it based on ShadowCopy AppDomain launching so as to allow 
> >> overwritting the assemblies in Win32 OS?
> >>
> >> If not, I would probably be interested in adding this feature in it for 
> >> using it in my projects. What do you think?
> > 
> > Dynamic updating of add-ins is not supported right now, but I'm pretty
> > sure it will be supported in the future, taking into account the
> > feedback I got about that.
> 
> Thanks for the information. I will see if I can help in adding it or 
> else I'll wait for it.
> 
> 
> > However, as Matthijs pointed out in his reply, app-domains don't play
> > well with GUI toolkits, and GTK# is not an exception.
> 
> Mmmmm, why? I didn't have any information about this. Could you 
> ellaborate? It sounds very strange to me because I already have a 
> mini-framework which supports this and uses WinForms.

I can't tell for WinForms, but it won't work with gtk#. One problem is
that the GType types that gtk# creates for every managed subclass of a
widget are per-process, not per-assembly, and you'll get errors when
trying to use the same classes from different app-domains. Another
problem is that gtk# does not support having two managed objects to
represent the same GTK object. What would happen if you override the
OnKeyPress event on both objects? which one would be called? And even if
you application had an strict control on the objects and avoided
creating two managed objects for the same GTK object, the application
has no control on the main GTK thread, so for example the GTK thread
might receive an event for an object from domain A, while running in
domain B.

GTK# can probably be improved to support multiple domains (even with
some limitations), but it would require an important redesign of the
internals (e.g. reference tracking), and IMO the effort needed is not
worth it.

Lluis.




More information about the Mono-list mailing list