[Mono-list] Error passing ref argumentes between classes

Jorge De Gante jdegante@linuxware.com.mx
21 Aug 2003 16:37:53 -0500


--=-QMhFBwsdIzRWauhotneo
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Hi everybody

Why I get this error when I try to run the program?

[jdegante@jorge err_parametro]$ mono err_parametro.exe
 
Unhandled Exception: System.NullReferenceException: A null value was
found where an object instance was required
in <0x00098> 00 err_prueba.Secundaria:.ctor (err_prueba.Mensaje&)
in <0x00031> 00 err_prueba.Principal:on_button1_clicked
(object,System.EventArgs)
in <0x0005a> 01 System.MulticastDelegate:invoke_void_object_EventArgs
(object,System.EventArgs)
in <0x0013c> 00 GtkSharp.voidObjectSignal:voidObjectCallback
(intptr,int)
in <0x00030> 05 GtkSharp.voidObjectSignal:voidObjectCallback
(intptr,int)
in (unmanaged) 06 Gtk.Application:gtk_main ()
in <0x00004> 06 Gtk.Application:gtk_main ()
in <0x00007> 00 Gtk.Application:Run ()
in <0x00090> 00 err_prueba.Principal:.ctor ()
in <0x00025> 00 err_prueba.app:Main (string[])

I'm passing the ref vars beteewn classes the right way?

Or I'm doing something wrong?

The sources are attched.


Im using:
mono-0.25-1.ximian.6.1
mono-devel-0.25-1.ximian.6.1
monodoc-0.5-1.ximian.6.1
gtk-sharp-0.10-1.ximian.6.1



Thanks in advance.

--=-QMhFBwsdIzRWauhotneo
Content-Disposition: attachment; filename=ejemplo.tgz
Content-Type: application/x-compressed-tar; name=ejemplo.tgz
Content-Transfer-Encoding: base64

H4sIAC8pRT8AA+09bWwcx3Wz/DjyTiYtypIs25IyPMkOqZL3RR6pUCSlE3mU6fBDJSnKspuclndL
csXl7Xl3TyKjqkmAIIH/tEXQIEFbG2h/BEKAoC1QtEHQH22BFmkBAynyJz8a1O4HkB9B0aIFUhQo
3PdmZm/3jne8k3SiJHueNHvz/d7MvPdm5u3sULOsTEG11G3NscwoeSwQiw3HRkeT8BuLjY6U/wog
kCERj48OxxJxEosPJZNxQpOPh5xyKNqOalFKshuqcVv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