[Gtk-sharp-list] portability issues

Paulo Pires paulo.pires@vodafone.pt
Thu, 14 Oct 2004 19:27:22 +0100


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 ... 

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