[MonoDevelop] Running Mono with Glade ..... ERROR

Paulo Aboim Pinto esqueleto@tusofona.com
Wed, 14 Apr 2004 21:48:53 +0100


--=-e6gN2BsQgJwRY5eHT3R+
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Hello

tkx for your response.

I had try to find if i have this kind of error, but no.

i will paste here my file for you to try to undestand what is happening:

.glade file

[...]
<child>
                    <widget class=3D"GtkButton" id=3D"button1">
                      <property name=3D"width_request">62</property>
                      <property name=3D"height_request">31</property>
                      <property name=3D"visible">True</property>
                      <property name=3D"can_focus">True</property>
                      <property name=3D"label"
translatable=3D"yes">button1</property>
                      <property name=3D"use_underline">True</property>
                      <property
name=3D"relief">GTK_RELIEF_NORMAL</property>
                      <signal name=3D"clicked"
handler=3D"on_button1_clicked" last_modification_time=3D"Wed, 14 Apr 2004
20:35:51 GMT"/>
                    </widget>
                    <packing>
                      <property name=3D"x">224</property>
                      <property name=3D"y">56</property>
                    </packing>
                  </child>
[...]


.cs file
namespace GladeSamples=20
{
	using System;
    using Gtk;
	using Glade;
   	using GtkSharp;

    public class GladeTest
    {
        public static void Main (string[] args)
        {
            new GladeTest(args);
        }
       =20
        public GladeTest (string[] args)=20
        {
            Application.Init();
            XML gxml =3D new Glade.XML ("project1.glade", "window1",
null);   =20
		try
           	{
           		gxml.Autoconnect (this);
           		window1.showall();
            		Application.Run();
           	}
           	catch (Exception ex)
       		{
        		Console.WriteLine ("Erro in main \n\n{0}", ex);
        	}
        }
       =20
        public void onButtonClicked (System.Object obj, EventArgs e)=20
        {
        	Console.writeline("Button clicked");
        }
    }
}

as you can see i have the same handler in glade file and CS file.
But i get this error even without the definition in the CS file. Only
have the signal definned in the glade file i get the error.

Can any one help ???


On Wed, 2004-04-14 at 17:47, Laurent Guisset wrote:
> I think that the name of the method in the .cs file and the
> name of the handler in the .glade file must be the same, this is
> required by the Autoconnect method.
>=20
> Example :
> *********
>=20
>=20
> .glade file
> *************
>=20
> ...
> <signal name=3D"clicked" handler=3D"*OnButtonClicked*"=20
> last_modification_time=3D"Wed, 14 Apr 2004 09:11:35 GMT"/>
> ...
>=20
>=20
>=20
> .cs file
> ********
>=20
> public void *OnButtonClicked* (System.Object obj, EventArgs e)
> {
>     Console.WriteLine ("Button 1 clicked");
> }
>=20
> _______________________________________________
> Monodevelop-list mailing list
> Monodevelop-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/monodevelop-list
--=20

Paulo Aboim Pinto
Odivelas - Portugal

--=-e6gN2BsQgJwRY5eHT3R+
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQBAfaOzR5pQJCqilfURAijvAKCHv84VhBmqyw0tiboylNicSNB0IgCgpOV9
hsUImvtvQjv1QV/vlJMuWF0=
=FRKT
-----END PGP SIGNATURE-----

--=-e6gN2BsQgJwRY5eHT3R+--