[Mono-list] window

Rodolfo Campero rodolfo.campero at gmail.com
Thu May 26 10:14:14 EDT 2005


Hi,

C# is case sensitive, try to rename your handler in the glade file to
"Calculer" instead of "calculer" (or do the opposite change in the
code).

On 5/26/05, sabri safaa <sab_safaa at yahoo.fr> wrote:
> 
> 
> sabri safaa <sab_safaa at yahoo.fr> a écrit: 
>  
> 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;
>     }
> }


More information about the Mono-list mailing list