[Kde-bindings] KDE/kdebindings/csharp

Arno Rehn arno at arnorehn.de
Tue Jul 1 12:39:11 UTC 2008



On Tuesday 01 July 2008 14:23:56 Richard Dale wrote:
> On Tuesday 01 July 2008 13:14:57 Arno Rehn wrote:
> > On Tuesday 01 July 2008 14:02:22 Richard Dale wrote:
> > > On Tuesday 01 July 2008 12:33:09 Arno Rehn wrote:
> > > > On Tuesday 01 July 2008 12:23:03 Richard Dale wrote:
> > > > > On Tuesday 01 July 2008 02:23:34 Arno Rehn wrote:
> > > > > > SVN commit 826584 by arnorehn:
> > > > > >
> > > > > > * Added KMonoPluginFactory. Behaves similar to
> > > > > > KRubyPluginFactory: * If the keyword is Foo/Bar.dll, a class
> > > > > > 'Bar' is searched in the namespace 'Foo'.
> > > > > > 	* This class has to have a constructor that takes a QObject (the
> > > > > > 	  parent) and a List<QVariant> (the arguments).
> > > > > > * Moved the runtime initialization from the static
> > > > > > SmokeInvocation constructor to a new method 'InitRuntime'. This
> > > > > > is necessary for KMonoPluginFactory to work.
> > > > >
> > > > > Sounds good we should be able to load C# plasma applets now. But
> > > > > I'm not sure about the name as it sounds like it should be
> > > > > KimonoPluginFactory to me, if that is project it is part of?
> > > >
> > > > Well, it's also KRubyPluginFactory and not KorundumPluginFactory ;).
> > >
> > > Yes you're right - I didn't actually invent that name, but I think I
> > > would have called it that.
> > >
> > > > But I'm not sure about the name, either. If we ever port this to
> > > > Windows, we'll probably want to use the original .NET API and not
> > > > Mono. So maybe KimonoPluginFactory is indeed better.
> > >
> > > I was thinking it would be kcsharppluginfactory to be the same as
> > > krubypluginfactory, but that doesn't really roll off the tongue very
> > > easily.
> > >
> > > One other thing this comment:
> > >
> > > // a path in the form Foo/Bar.dll results in the class Bar in the
> > > namespace Foo
> > >
> > > Won't we have lower case names just like the ruby ones, eg
> > > foo_bar_baz/my_stuff.dll that would be converted to class MyStuff in
> > > namespace FooBarBaz?
> >
> > I thought about that - but in C# it's common to have camel case
> > everywhere, so I didn't see a need for that. Even the assemblies are all
> > named like that.
>
> I see, but the foo_bar_baz bit where the .dll gets installed, will be a kde
> directory under share/apps and everything there is in lower case.
I see. Maybe we should include such a camlizing fuwnction - if the user 
doesn't want this, he can name it whatever he wants.

> Can assemblies with the same name be loaded into a single process - they
> might have to all be called main.dll for the plasma script engine api using
> Plasma PackageStructures and packages? They would be under different paths
> and so the namespace would be different. In Ruby you can have any class you
> like as long as it's called 'Main' at the moment.
I think this should be possible. As long as the namespace is different and the 
path given to mono_domain_assembly_open is absolute, there should be no 
problems.


-- 
Arno Rehn
arno at arnorehn.de



More information about the Kde-bindings mailing list