Message-ID: <438FBA28.1090502 at yahoo.com> Date: Thu, 01 Dec 2005 19:06:16 -0800 From: Jeff Henrikson MIME-Version: 1.0 To: Jeff Henrikson CC: lablgtk at math.nagoya-u.ac.jp Subject: Re: lablgtk w/threads References: <438F2323.4010806 at yahoo.com> In-Reply-To: <438F2323.4010806 at yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sorry, On second observation, I've boiled this down to be an aqua-specific issue. So never mind! Thanks all, Jeff Henrikson Jeff Henrikson wrote: > 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 ();; > >