[Kde-bindings] Qyoto gets better...

Richard Dale Richard_Dale at tipitina.demon.co.uk
Tue Nov 29 11:33:03 UTC 2005


On Monday 28 November 2005 21:25, Arno Rehn wrote:
> Am Montag, 28. November 2005 13:44 schrieb Arno Rehn:
> > Hi,
> >
> > Ok, with the last update there's some progress. Now I don't get some
> > Index out of range error anymore, but it still doesn't work:
> >
> > Invoke() MethodName: NewQApplication Type: Qt.QApplication, hello,
> > Version=0.0.0.0, Culture=neutral, PublicKeyToken=null ArgCount: 2
> > FindMethod() className: QApplication MethodName: QApplication$?
> >                 In FindMethodId QApplication::QApplication$? => 146
> > FindMethod() MethodName: QApplication$? result: 154
> >         ArgName: argc Arg: 0 Type: System.Int32		//hmm... Arg:0 I think,
> > the path to the executable is already an argument ?!
> >
> >         ArgName: argv Arg: System.String[] Type: System.String[]
> > In CallMethod methodId: 154 target: 0x00000003 items: 2
> > In CallMethod 0		// seems not to be right
> > In CallMethod classId: 123
> > result 999		// was not correctly called
> >
> > Invoke() MethodName: NewQDialog Type: Qt.QDialog, hello, Version=0.0.0.0,
> > Culture=neutral, PublicKeyToken=null ArgCount: 0
> > FindMethod() className: QDialog MethodName: QDialog
> >                 In FindMethodId QDialog::QDialog => 2022
> > FindMethod() MethodName: QDialog result: 2144
> > In CallMethod methodId: 2144 target: 0x00000003 items: 0
> > In CallMethod 137193560
> > In CallMethod classId: 123
> > result 999
> > // this is called properly, but with no proper initialization of a
> > QApplication it doesn't run.
> >
> >
> > I modified the QApplication-Constructor to pass the Proxy an argc with a
> > "Length + 1". Then the output says "ArgName: argc Arg: 1 Type:
> > System.Int32" and "In CallMethod 1" instead of "In CallMethod 0". This
> > seems to be better, but not good.
Yes, I'm not sure if C# has the program name in argv[0] or not - so maybe that 
needs adding before calling the C++ method that is expecting it to be there.

> I think I have to take a look in the source-code before I say something
> here. The "result 999" has to do nothing with the execution of a method,
> that is hardcoded into the libqyoto.so. But why is the mehtod not
> successfully called when there's more than one argument? I'll have a closer
> look at the Qt.cpp from qtruby. Maybe that helps a bit.
Yes, stuff like the hard coded result is there just to demonstrate that it's 
possible to return a result back to C#. I'll try and post an explanation of 
what it's all about, and what is missing when I've time - it is very similar 
to qtruby though, so it won't do any harm to look at that code.

-- Richard



More information about the Kde-bindings mailing list