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

Paulo Aboim Pinto esqueleto@tusofona.com
Wed, 14 Apr 2004 22:27:01 +0100


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

Sorry ... but i paste here the wrong file.

i've try so many thing and i paste the wrong version of the file.

with the same name a get the same erros.

i can post all file for you to Debug.

tkx for the response

(())
Paulo Aboim Pinto
Portugal

On Wed, 2004-04-14 at 22:11, John Luke wrote:
> Your glade file has:
> on_button1_clicked
> not:
> onButtonClicked=20
>=20
> as you have it in your code.  It has to be the exact name for it to
> work. So either change the glade file to match your code or vice-versa.
>=20
> On Wed, 2004-04-14 at 21:48 +0100, Paulo Aboim Pinto wrote:
> > Hello
> >=20
> > tkx for your response.
> >=20
> > I had try to find if i have this kind of error, but no.
> >=20
> > i will paste here my file for you to try to undestand what is happening=
:
> >=20
> > .glade file
> >=20
> > [...]
> > <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 20=
04
> > 20:35:51 GMT"/>
> >                     </widget>
> >                     <packing>
> >                       <property name=3D"x">224</property>
> >                       <property name=3D"y">56</property>
> >                     </packing>
> >                   </child>
> > [...]
> >=20
> >=20
> > .cs file
> > namespace GladeSamples=20
> > {
> > 	using System;
> >     using Gtk;
> > 	using Glade;
> >    	using GtkSharp;
> >=20
> >     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");
> >         }
> >     }
> > }
> >=20
> > 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.
> >=20
> > Can any one help ???
> >=20
> >=20
> > 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
> >=20
> > Paulo Aboim Pinto
> > Odivelas - Portugal
--=20

Paulo Aboim Pinto
Odivelas - Portugal

--=-gQeYibXeLDcYACfvf+VB
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)

iD8DBQBAfaylR5pQJCqilfURAgSCAJ9TOQZ6Rrh3cHsPyxxSy3SZGOlNkQCfdjXN
oRbf2cOv4M7VrECx6mE94Pg=
=bs3Z
-----END PGP SIGNATURE-----

--=-gQeYibXeLDcYACfvf+VB--