From: Marco T. G. e S. <marcot@r. net> - 2008-07-01 21:17:33
|
Hello, I'm trying to ltrace a simple haskell glade test, but when I use zenity's glade, I can't ltrace it, but with the "same" test in C, ltrace goes with no problem: This haskell test is ltraceable: import Control.Monad import Data.Maybe import Graphics.UI.Gtk import Graphics.UI.Gtk.Glade main :: IO () main = do initGUI glade <- liftM fromJust $ xmlNew "teste.glade" window <- xmlGetWidget glade castToWindow "window1" onDestroy window mainQuit widgetShow window mainGUI $ ghc --make -Wall testeglade.hs $ ltrace ./testeglade http://marcotmarcot.googlepages.com/testeglade.txt This one is not: import Control.Monad import Data.Maybe import Graphics.UI.Gtk import Graphics.UI.Gtk.Glade main :: IO () main = do initGUI glade <- liftM fromJust $ xmlNew "/usr/local/share/zenity/zenity.glade" window <- xmlGetWidget glade castToWindow "zenity_error_dila" onDestroy window mainQuit widgetShow window mainGUI $ ghc --make -Wall teste.hs $ ltrace ./teste http://marcotmarcot.googlepages.com/teste.txt And this C code is ltraceable: #include <gtk/gtk.h> #include <glade/glade.h> void destroy(GtkWidget *widget, gpointer user_data) { gtk_main_quit(); } int main(int argc, char *argv[]) { GladeXML *xml; GtkWidget *window; gtk_init(&argc, &argv); xml = glade_xml_new("/usr/share/zenity/zenity.glade", NULL, NULL); window = glade_xml_get_widget(xml, "zenity_error_dialog"); gtk_signal_connect(GTK_OBJECT (window), "destroy", GTK_SIGNAL_FUNC (destroy), NULL); gtk_widget_show_all(window); gtk_main(); return 0; } $ gcc test.c -o test `pkg-config --cflags --libs libglade-2.0` $ ltrace ./test http://marcotmarcot.googlepages.com/test.txt I'm using gtk2hs 0.9.13. Can you reproduce that? -- Marco Túlio Gontijo e Silva Página: http://marcotmarcot.googlepages.com/ Blog: http://marcotmarcot.blogspot.com/ Correio: ma...@ri... XMPP: ma...@ja... IRC: ma...@ir... Telefone: 25151920 Celular: 98116720 Endereço: Rua Turfa, 639/701 Prado 30410-370 Belo Horizonte/MG Brasil |