[Gtk-sharp-list] Glade event handler mono+linux vs. win32+.NET
John D. Hardin
jhardin@impsec.org
Wed, 5 May 2004 21:09:40 -0700 (PDT)
All:
Noob warning. Apologies in advance for stoopid ignorance.
I have the following code (severely reduced, I hope it's enough to
accurately describe the problem):
public class GUI
{
public GUI()
{
Glade.XML gxml = new Glade.XML
("primes_ui_gtk.glade", "wMain", null);
gxml.Autoconnect (this);
}
public void on_wMain_delete_event (object o,
DeleteEventArgs args)
{
Application.Quit ();
}
With the following glade XML:
<widget class="GtkWindow" id="wMain">
<signal name="delete_event" handler="on_wMain_delete_event"
last_modification_time="Tue, 04 May 2004 20:42:12 GMT"/>
The application compiles and works properly under Linux with mono 0.25
and gtk-sharp 0.15, but when I copy the .exe and .glade files and try
to run it under win32 .NET 1.1 (current from Windows Update) and GTK#
from the gtk-sharp-0.18-win32 install set that's presently on the
website, I get this:
Unhandled Exception: Glade.HandlerNotFoundException: No handler
on_wMain_delete_event found for signal delete_event
at Glade.SignalConnector.ConnectFunc(String handler_name, IntPtr
objekt_ptr,
String signal_name, String signal_data, IntPtr connect_object_ptr,
Int32 after,
IntPtr user_data)
at Glade.SignalConnector.glade_xml_signal_autoconnect_full(IntPtr
raw, RawXML
ConnectFunc func, IntPtr user_data)
at Glade.SignalConnector.Autoconnect()
at Glade.XML.Autoconnect(Object handler)
at PrimesUI.PrimesUI.Main()
Why doesn't the Windows glade-sharp see the event handler?
Thanks for any help or pointers.
--
John Hardin KA7OHZ ICQ#15735746 http://www.impsec.org/~jhardin/
jhardin@impsec.org FALaholic #11174 pgpk -a jhardin@impsec.org
key: 0xB8732E79 - 2D8C 34F4 6411 F507 136C AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
Bush? Kerry? I'm so sick of our elections always being "choose the
lesser of two evils."
-----------------------------------------------------------------------
181 days until the Presidential Election