[Gtk-sharp-list] deprecated Combo not working in gtk# 1.0 on Win32 using gtk+ 2.6

Francis Brosnan Blazquez francis at aspl.es
Wed Jun 29 04:20:41 EDT 2005


El lun, 27-06-2005 a las 20:28 -0400, Daniel Morgan escribió:
> Both gtk# 1.0 and gtk# 1.9 are shipped with the mono 1.1.7 and 1.1.8 
> windows installers.  Using -pkg:gtk-sharp will use gtk# 1.0 while 
> -pkg:gtk-sharp-2.0 will use gtk# 1.9.  Both are installed in Mono's 
> GAC.  So, both are running okay.  I did port sql# for gtk# to gtk# 2.0 
> using a ComboBox, and it works okay.   However, my problem is with Combo 
> working on gtk# 1.0.

Hi Daniel,

I've experimented the same problems using the installer for mono 1.1.7.
The problem is that Win32 installer for mono-1.1.7 comes with a gtk#
1.0, version 1.0.9. The bug your are experimenting is solved at 1.0.10
release which seems to be released inside Win32 installer for Mono
1.1.8.

I can't confirm you if Mono 1.1.8 installer solves the problem. What we
have done to workaround this problem is to use Mono-1.1.7 win32
installer and to install over it gtk# 1.0 (version 1.0.10).

You can check the following thread for more information.
http://lists.ximian.com/pipermail/gtk-sharp-list/2005-June/005960.html

I hope it helps Daniel,

Cheers.

> 
> Sorry, I could not get bugzilla to work for me today.  So, here is the 
> error.
> 
> Take the Combo example in monodoc and run it. 
> 
> E:\backup_stuff\sqlsharpgtk>mcs ComboTest.cs -pkg:gtk-sharp
> 
> E:\backup_stuff\sqlsharpgtk>mono ComboTest.exe
> 
> (<unknown>:168): GLib-CRITICAL **: g_convert: assertion `str != NULL' failed
> 
> Unhandled Exception: System.NullReferenceException: Object reference not 
> set to
> an instance of an object
> in <0x00152> ComboSample:.ctor ()
> in <0x00016> ComboSample:Main ()
> 
> This is the source:
> 
> using System;
> using Gtk;
> 
> class ComboSample {
>     Combo combo;
>     
>     static void Main () {
>         new ComboSample ();    
>     }
>     
>     ComboSample () {
>         Application.Init ();
>     
>         Window win = new Window ("ComboSample");
>         win.DeleteEvent += new DeleteEventHandler (OnWinDelete);
> 
>         string[] list = new string[] {"one", "two", "three"};
>          
>         combo = new Combo ();
>         combo.PopdownStrings = list;
>         combo.DisableActivate ();
>         combo.Entry.Activated += new EventHandler (OnEntryActivated);
>          
>         win.Add (combo);
>     
>         win.ShowAll ();
>         Application.Run ();
>     }
>     
>     void OnEntryActivated (object o, EventArgs args) {
>         Console.WriteLine (combo.Entry.Text);
>     }
>     
>     void OnWinDelete (object obj, DeleteEventArgs args) {
>         Application.Quit ();
>     }
> }
> 
> Mike Kestner wrote:
> 
> >On Sat, 2005-06-25 at 19:50 -0400, Daniel Morgan wrote:
> >  
> >
> >>When I tried to run sql# for gtk# on Mono 1.1.7 for Windows, it failed 
> >>to run because the Combo failed.
> >>sql# for gtk# was using gtk# 1.0.x and gtk+ 2.6. 
> >>
> >>Even though Combo was deprecated in gtk+ 2.4, it should still work in 
> >>gtk+ 2.6.
> >>
> >>I recently chatted with Todd Berman, and he said the deprecated Combo 
> >>works fine in MonoDevelop running on gtk+ 2.6.
> >>
> >>So, is this a Win32 problem with gtk+, gtk# 1.0.x , or the installer?
> >>
> >>Can someone please look into this problem?
> >>    
> >>
> >That's going to be hard to do without more details than "the Combo
> >failed."  If you can provide a minimal sample application that
> >reproduces the problem, please open a bug report including the output
> >that occurs on failure.  
> >
> >When you say you "tried to run sql# for gtk# on Mono 1.1.7 for Windows"
> >are you saying you tried to run a binary that was compiled against Gtk#
> >1.0.x on mono 1.1.7?  There are different assembly versions involved
> >there, so if the 1.1.7 installer doesn't have a set of Gtk# 1.0.x
> >assemblies in its GAC, that would be a problem.  I'm just stabbing in
> >the dark because the problem description above is fairly vague.
> >
> >Gtk# 1.0.x and 2.x are parallel-installable and there is no current plan
> >to provide a mechanism to run applications compiled against 1.0.x on a
> >2.x installation.  You will still have to have 1.0.x assemblies
> >installed.  If this is the problem you are indicating, perhaps paco
> >needs to consider shipping a combined 1.0.x/2.x installer for Gtk# on
> >win32?  Either that or there needs to be a way to install 1.0.x and 2.x
> >Gtk# into a single mono install.
> >
> >FWIW, I just compiled and ran the sample/test/WidgetViewer.exe
> >application on the MS 1.1 runtime with gladewin 2.6.8-rc1 and Gtk# trunk
> >and the Combo sample (which is still Gtk.Combo, not ComboBox) runs
> >without any problems.
> >
> >  
> >
> 
> _______________________________________________
> Gtk-sharp-list maillist  -  Gtk-sharp-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
> 

-- 
Francis Brosnan Blazquez <francis at aspl.es>



More information about the Gtk-sharp-list mailing list