[Gtk-sharp-list] portability issues

Paulo Pires paulo.pires@vodafone.pt
Fri, 22 Oct 2004 11:32:58 +0100


I've gathered the two scenarios into one final scenario! Check it at

It's working great on Linux, but in Windows it's a big *shit* :(

Windows: mcs -pkg:gtk-sharp -pkg:glade-sharp -resource:trafficman.glade
Main.cs wndSplash.cs wndMain.cs Globals.cs

It's quite a tiny project, but I'm stuck, and I'm really needing this
working, so any help is very appreciated.

Thanks in advance
Paulo Pires

Qui, 2004-10-14 =E0s 19:27 +0100, Paulo Pires escreveu:
> Hi folks
> I'm new to .NET, GTK and Glade, so perhaps it's my problem instead of
> GTK# or Glade#.
> I'm trying to develop an app fully-portable between Windows and Linux
> but some problems came to me while still testing. I've taken two
> scenarios:
> 1 - A simple Glade# app, built on Glade without any signals, besides
> delete_event, attached on a bunch of code who shows a Gtk.Window.
> Well, I've compiled it on Linux and tried to run it in Windows! After
> installing the combined package of Mono+Gtk-sharp i've runned it and
> everything went well, except the GtkToolItem and GtkToolButton widgets
> that weren't recognized. I'm using glade-2.6.2.
> My 1st question is: Are these widgets supported on Windows?
> 2 - A-not-so-simple-full-gtk#-app, with two windows: wndSplash and
> wndMain.
> wndSplash has a Progressbar, which is updated using a Thread that once
> completed destroys the current Window and creates the wndMain.
> I had a problem! My wndSplash would die when calling the wndMain, with
> this error: Xlib: async reply 0x00blablabla.
> After searching about it, I've realized about GTK mainloop and found the
> Gdk.Threads.Enter() .Leave() .Init(), etc.
> This solved my problem, but now, sometimes when I run the resulting exe
> on Linux, it shows me the wndSplash with all the widgets but the
> ProgressBar is not updated.
> All the code is running fine, since I have my own debug on each Thread
> and it's debuggin right. So I close my app, and try to run it again!
> SURPRISE! It works very well! The ProgressBar is updated and all the
> widgets works ...=20
> My 2nd question is: What the hell is going on?
> On Windows, I've compiled* it tried to run it and it works, but my
> Threads don't debug :(. It creates the wndSplash and then wndMain, but
> all of them without widgets and the program does not respond.
> My 3rd question: Any clue about this?
> *compiled: mcs -pkg:gtk-sharp wndSplash.cs wndMain.cs
> If you want to checkout the code just ask me thought my personal mail
> and I'll send it to you.
> Sorry for my bad english!
> Thanks in advance,
> Paulo Pires
> _______________________________________________
> Gtk-sharp-list maillist  -  Gtk-sharp-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/gtk-sharp-list