[Gtk-sharp-list] wrapping signal handlers

Edd Dumbill edd@usefulinc.com
Sat, 31 Jan 2004 02:13:35 +0000


I've been playing with using the gapi- stuff to wrap a gobject based
library I wrote.  I solved quite a few problems by realising the
indenting of my original C source wasn't quite right, so I fixed that
up.

However I've hit a wall with wrapping of a signal.   When I try and use
the signal in a test application I get this exception when the signal is
sent to the handler.

Unhandled Exception: System.ArgumentNullException: Argument cannot be
null
Parameter name: type
in <0x00049> System.Activator:CreateInstance (System.Type,bool)
in <0x00012> System.Activator:CreateInstance (System.Type)
in <0x000f2>
BtctlSharp.voidObjectstringuintSignal:voidObjectstringuintCallback
(intptr,string,uint,int)
in <0x00052> (wrapper native-to-managed)
BtctlSharp.voidObjectstringuintSignal:voidObjectstringuintCallback
(intptr,intptr,uint,int)
in (unmanaged) (wrapper managed-to-native)
Btctl.Controller:btctl_controller_discover_devices (intptr)
in <0x00004> (wrapper managed-to-native)
Btctl.Controller:btctl_controller_discover_devices (intptr)
in <0x0001f> Btctl.Controller:DiscoverDevices ()
in <0x000c5> Btctl.Test.TestApp:Main (string[])

I noticed that this was exactly the error reported in this post
http://lists.ximian.com/archives/public/gtk-sharp-list/2002-November/000595.html

so I was wondering if anyone can point me to the most likely source of
my problem.  I get the same if I try it with any of the other signals so
it looks like something I'm getting systematically wrong.

thanks

-- Edd