[Kde-bindings] Qyoto TODO

Richard Dale Richard_Dale at tipitina.demon.co.uk
Fri May 26 11:41:21 UTC 2006


Hi Arno

On Friday 26 May 2006 12:14, Arno Rehn wrote:
> Hi,
>
> Ok, with newest update from Paolo this won't make much sense anymore, but I
> tried to send this message for 2 times, and the Mailing-List just didn't
> accept it...
Oops, I don't know why that would be..

> I've just done some of the parts in the TODO, but first there is a problem
> with the new way to set up Q_EMIT:
> In the line 'Q_EMIT = (IQWidgetSignals) realProxy.GetTransparentProxy();'
> there is a cast to 'IQWidgetSignals' from the 'standard' proxy. If you want
> everything in the Dummy-constructor, this cast has to be dynamic because we
> get the type of the interface at runtime. But I don't know, whether it is
> possible in C# to cast to another type only with the inforamtion of a
> System.Type. I left this part of the TODO-list out, because it just seems
> to be a smarter way than it now is.
This is the code from Paolo that I added this morning:

		protected QObject(Type dummy) {
			Type t = GetType();
#if DEBUG
			Console.WriteLine("ENTER: dummy constructor for {0}", t);
#endif
			MethodInfo m = t.GetMethod("Emit", BindingFlags.NonPublic | 
BindingFlags.Instance);
			if (m != null) {
				Type proxyInterface = m.ReturnType;
				SignalInvocation realProxy = new SignalInvocation(proxyInterface, this);
				Q_EMIT = realProxy.GetTransparentProxy();
			} else {
				Console.WriteLine("Could not find Emit");
			}
		}

> But I have added the static methods in Qyoto.cs; the C++ stuff Richard has
> to do on his own, I think. I myself still don't really get through the code
> in the C++ files.
>
> Attachment: Qyoto.cs with the new functions in the Qyoto class.
OK great! I'll have a look. I think Paolo was about to start on this, so we'll 
need to coordinate via the list, or arrange to meet on irc. Maybe he can do 
the C++ part.

-- Richard



More information about the Kde-bindings mailing list