mail-archives/gtk-sharp-list/2005-June/005962.html

153 строки
5.5 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [Gtk-sharp-list] Problems and fixing ups
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:gtk-sharp-list%40lists.ximian.com?Subject=%5BGtk-sharp-list%5D%20Problems%20and%20fixing%20ups&In-Reply-To=">
<META NAME="robots" CONTENT="index,nofollow">
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
<LINK REL="Previous" HREF="005961.html">
<LINK REL="Next" HREF="005963.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[Gtk-sharp-list] Problems and fixing ups</H1>
<B>Francis Brosnan Bl&#225;zquez</B>
<A HREF="mailto:gtk-sharp-list%40lists.ximian.com?Subject=%5BGtk-sharp-list%5D%20Problems%20and%20fixing%20ups&In-Reply-To="
TITLE="[Gtk-sharp-list] Problems and fixing ups">francis at aspl.es
</A><BR>
<I>Tue Jun 7 15:14:17 EDT 2005</I>
<P><UL>
<LI>Previous message: <A HREF="005961.html">[Gtk-sharp-list] Gtk# 1.0.9 on WindowsXP
</A></li>
<LI>Next message: <A HREF="005963.html">[Gtk-sharp-list] Problems and fixing ups
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#5962">[ date ]</a>
<a href="thread.html#5962">[ thread ]</a>
<a href="subject.html#5962">[ subject ]</a>
<a href="author.html#5962">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>Hi,
Finally I can confirm the previous error happens while using the gtk#
1.0.9 (assembly version=1.0.0.0) which
is bundle with the last Mono installer (1.1.7 with gtk# 1.9.3 but also
1.0.9). This bug causes your
app to get a null reference while accessing Gtk.Entry inside a
Gtk.ComboBox on Windows XP.
To solve this problem I've compiled and installed the last stable
version (I suppose it is) from the
svn repository at
<A HREF="http://svn.myrealbox.com/source/branches/gtk-sharp-1-0-branch/">http://svn.myrealbox.com/source/branches/gtk-sharp-1-0-branch/</A> over
the actual installation the Mono 1.1.7 installer does.
The current version this gtk-sharp branch claims to have is 1.0.10.99
(extract from configure.in).
In order to compile the gtk-sharp module I've used the mingw and msys
packages. Additionally
I've used the libraries which the Mono installer comes with. I've
created a set of make files
called makefile.mingw starting from the already existing make files
called makefile.win32.
This set of makefiles are based on mingw. They not only compiles the
gtk-sharp module but also prepares the
AssemblyInfo.cs files (by using the actual AssemblyInfo.cs.in) without
requeiring autotools, install
the gtk-sharp.snk file inside the directories building an assembly and
allows you to optionally
install the assemblies (by using the gacutil) and the glue dlls.
I think this makefiles may be useful because build ups the gtk-sharp
module by using the Mono installation
(taking advantage of the libraries which Mono installs) and a simply
mingw installation
(not all people uses cygwin) based only on two packages (mingw and
msys). This will also allow
people to solve posible problems by using the last mono installer on
windows XP until the next stable
realese for gtk-sharp. Mail me if these makefiles can be useful to
gtk-sharp project.
The other question I've found while using gtk-sharp is a bug on the
glade-sharp module. It is quite
simple to reproduce. Set the same method to catch an event on different
objects and a NRE will
arise on AutoConnect method. This problem may have relation with the bugs:
<A HREF="http://bugzilla.ximian.com/show_bug.cgi?id=74946">http://bugzilla.ximian.com/show_bug.cgi?id=74946</A>
<A HREF="http://bugzilla.ximian.com/show_bug.cgi?id=74216">http://bugzilla.ximian.com/show_bug.cgi?id=74216</A>
I've realized this happens on Windows XP but not on Linux (debian
installation).
I've also attached a simple test which connects the same signal (clicked
with OnClicked method)
to different buttons.
Cheers.
-------------- next part --------------
using Gtk;
using Glade;
using System;
public class Test {
public static void Main (string [] args) {
new Test ();
}
public Test () {
Application.Init ();
Glade.XML gxml = new Glade.XML (null, &quot;test.glade&quot;, &quot;window1&quot;, null);
gxml.Autoconnect (this);
Application.Run ();
}
void OnClicked (object o, EventArgs args) {
Gtk.Widget w = o as Widget;
Console.WriteLine (&quot;Clicked on: &quot; + w.Name);
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.glade
Type: text/xml
Size: 1996 bytes
Desc: not available
Url : <A HREF="http://galactus.ximian.com/pipermail/gtk-sharp-list/attachments/20050607/1d479b53/test.xml">http://galactus.ximian.com/pipermail/gtk-sharp-list/attachments/20050607/1d479b53/test.xml</A>
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI>Previous message: <A HREF="005961.html">[Gtk-sharp-list] Gtk# 1.0.9 on WindowsXP
</A></li>
<LI>Next message: <A HREF="005963.html">[Gtk-sharp-list] Problems and fixing ups
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#5962">[ date ]</a>
<a href="thread.html#5962">[ thread ]</a>
<a href="subject.html#5962">[ subject ]</a>
<a href="author.html#5962">[ author ]</a>
</LI>
</UL>
<hr>
<a href="http://lists.ximian.com/mailman/listinfo/gtk-sharp-list">More information about the Gtk-sharp-list
mailing list</a><br>
</body></html>