Message-ID: <438F2323.4010806 at yahoo.com> Date: Thu, 01 Dec 2005 08:21:55 -0800 From: Jeff Henrikson MIME-Version: 1.0 To: lablgtk at math.nagoya-u.ac.jp Subject: lablgtk w/threads Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hello, I got the gtk-osx port running on my machine here. Just forgetting how the lablgtk toplevel thing works. Is there anything wrong with the toplevel code below, from a lablgtk perspective? The behavior is the window comes up, but doesn't paint the button unless I occlude it. It also makes the "working" cursor if I click on it, and nothing gets drawn. Looks like a wedged message pump to me. I also tried GtkThread.init () instead of GtkThread.start (). From reading the code, it looks like start is better. Jeff #directory "+lablgtk";; #load "lablgtk.cma";; #load "unix.cma";; #directory "+threads";; #load "threads.cma";; GtkMain.Main.init ();; open GMain;; let window = GWindow.window ~border_width: 10 ();; let button = GButton.button ~label:"Hello World" ~packing: window#add ();; window#event#connect#delete ~callback:(fun _ -> prerr_endline "Delete event occured"; true);; window#connect#destroy ~callback:Main.quit;; button#connect#clicked ~callback:(fun () -> prerr_endline "Hello World");; button#connect#clicked ~callback:window#destroy;; window#show ();; #load "gtkThread.cmo";; let thread2 = GtkThread.start ();;