[Gtk-sharp-list] Re: window
Rafael Teixeira
monoman at gmail.com
Thu May 26 11:44:30 EDT 2005
Hi Sabri,
Please send that kind of question to the GTK-sharp-list
(gtk-sharp-list at lists.ximian.com just subscribe at
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list). There more
people can help you.
But answering your question: it seems we didn't take care of
case-sensitivity. In the glade file you wrote the event handler as
calculer
and in your code the method is named
Calculer
that won't work. You MUST write things the same way in both places.
:)
On 5/26/05, sabri safaa <sab_safaa at yahoo.fr> wrote:
> hello
> when I start the application like this
> >mono main.exe
> the window apear few second and die and i dont know why
> and i have yhis message
> Unhandled Exception: Glade.HandlerNotFoundException: No handler calculer
> found for signal clicked
> in <0x002fb> SignalConnector:ConnectFunc
> (string,intptr,string,string,intptr,int,intptr)
>
> in <0x0007c> (wrapper native-to-managed) SignalConnector:ConnectFunc
> (intptr,intptr,intptr,intptr,intptr,int,intptr)
>
> in (unmanaged) 02201B5F
>
> in <0x00004> (wrapper managed-to-native)
> SignalConnector:glade_xml_signal_autoconnect_full
> (intptr,Glade.XML/SignalConnector/RawXMLConnectFunc,intptr)
>
> in <0x00056> SignalConnector:Autoconnect ()
>
> in <0x00045> Glade.XML:Autoconnect (object)
>
> in <0x00045> Calculatrice:.ctor ()
>
> in <0x00016> Calculatrice:Main ()
>
> the code of my main.cs is
>
> using System;
> using Gtk;
> using Glade;
> public class Calculatrice
> {
> [Widget] Gtk.Entry entry1;
> [Widget] Gtk.Entry entry2;
> [Widget] Gtk.Label label2;
>
> public static void Main()
> {
> new Calculatrice();
> }
> public Calculatrice ()
> {
> Application.Init();
> Glade.XML gxml = new Glade.XML ("calc.glade", "window1", null);
> gxml.Autoconnect(this);
> Console.Out.WriteLine("hello1");
> Application.Run();
> }
> public void Calculer(object sender, EventArgs args)
> {
> double val1 = Double.Parse(entry1.Text);
> double val2 = Double.Parse(entry2.Text);
> label2.Text = ""+(val1 + val2);
> }
> private void OnWindowDeleteEvent (object sender, DeleteEventArgs a)
> {
> Application.Quit ();
> a.RetVal = true;
> }
> }
>
> ________________________________
> Découvrez le nouveau Yahoo! Mail : 1 Go d'espace de stockage pour vos
> mails, photos et vidéos !
> Créez votre Yahoo! Mail
>
>
--
Rafael "Monoman" Teixeira
---------------------------------------
I'm trying to become a "Rosh Gadol" before my own eyes.
See http://www.joelonsoftware.com/items/2004/12/06.html for enlightment.
It hurts!
More information about the Gtk-sharp-list
mailing list