[Gtk-sharp-list] Could someone explain why this is crashing?

Mike Flippin mikeflippin@blindmindseye.com
Fri, 18 Mar 2005 15:48:56 -0500


Yeah, it is the ComboBoxEntry. I just don't see any reason why it should 
be failing though. I am linking against GTK# 2.0 and there is both a 
ComboBoxEntry object and a ComboBox object in the Gtk namespace. Is this 
something I should report as a bug, you think?

If it makes any different, the version of mono I am running is the one 
that Novell packages on their Forge site that has Gtk# 2.0, Gecko# and 
all that in it.

Mike

Sergio Duran wrote:

>which one makes it crash? if you comment out only one of them, does it
>crash too?
>do the both of them make the app crash?
>
>I knew you meant them to be uncommented, that error happends when
>glade's autoconnect tries to bind a Widget defined in the glade xml to
>a Widget with the Glade.Widget attribute, and their types do not
>match.
>
>I'm going to make a wild guess and say that the problem lies with the
>ComboBoxEntry... comment it out on the C# code and try again to see
>what happends.
>
>On Fri, 18 Mar 2005 14:56:36 -0500, Mike Flippin
><mikeflippin@blindmindseye.com> wrote:
>  
>
>>The reason that those two widgets were commented out is that those are
>>what were causing the problem with it crashing. I realize now that I
>>should have posted the question with them uncommented.
>>
>>Mike
>>
>>Paulo Pires wrote:
>>
>>    
>>
>>>Hi
>>>
>>>It works for me. I'm using Mono 1.1.4 and gtk# 1.9.2
>>>I've made a couple changes:
>>>
>>><code>
>>>using Glade;
>>>using Gtk;
>>>using System;
>>>
>>>public class TestNewEntry
>>>{
>>>      //[Widget] VBox mainContainer;
>>>      //[Widget] ComboBoxEntry categoryComboEntry;
>>>
>>>      public TestNewEntry(string[] args)
>>>      {
>>>              Application.Init();
>>>              XML gxml = new Glade.XML("creatnewentry.glade", "window1", null);
>>>              gxml.Autoconnect(this);
>>>              Application.Run();
>>>      }
>>>      public static void Main(string[] args)
>>>      {
>>>              new TestNewEntry(args);
>>>      }
>>>}
>>></code>
>>>
>>>
>>>
>>>Sex, 2005-03-18 ās 07:29 -0800, mikeflippin@blindmindseye.com escreveu:
>>>
>>>
>>>      
>>>
>>>>I get this exception every time I try to a combo box, or anything else
>>>>that is derived from Gtk.Container.
>>>>
>>>>Unhandled Exception: System.ArgumentException: Object type cannot be
>>>>converted to target type.
>>>>Parameter name: val in <0x000b6> System.Reflection.MonoField:SetValue
>>>>(object,object,System.Reflection.BindingFlags
>>>>,System.Reflection.Binder,System.Globalization.CultureInfo)
>>>>in <0x00173> Glade.XML:BindFields (object,System.Type)
>>>>in <0x00019> Glade.XML:BindFields (object)
>>>>in <0x00016> Glade.XML:Autoconnect (object)
>>>>in <0x00047> TestNewEntry:.ctor (string[])
>>>>in <0x00027> TestNewEntry:Main (string[])
>>>>
>>>>Could someone explain what is going on here?
>>>>
>>>>
>>>>        
>>>>
>>>
>>>
>>>      
>>>
>>_______________________________________________
>>Gtk-sharp-list maillist  -  Gtk-sharp-list@lists.ximian.com
>>http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
>>
>>    
>>
>
>  
>