From: "Jeff Henrikson" To: Subject: lablgtk bugs Date: Thu, 3 May 2001 01:18:14 -0400 Message-ID: <001c01c0d390$742c8540$4d4106d1 at mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Importance: Normal Hi, I'm a new lablgtk user, and I have a few questions: 1) are all the examples known to work on windows? I get segfaults on some of them. In particular, one bug I tracked down was that all calls to the Gtk timer callback mechanism result in a crash upon the second callback. (lissajous.ml is one such example. You can observe the one successful callback by setting the time value to be large.) As I am new to the Caml FFI (and Caml in general) I do not know where to suspect a bug. 2) Is there a way to repaint a window in a multithreaded app from a non-drawing thread? It seems that most of the examples just call their own paint handlers directly. This is bad when you have multiple theads because to get your drawing right it's best to have only one thread drawing. The ordinary way to deal with this is to send an expose message to yourself when you want to paint. But I can't figure out how to use any of the "emit" functions in gtkSignal.ml or anywhere else: let emit (obj : 'a obj) ~(sgn : ('a, 'b) t) ~(emitter : 'a obj -> name:string -> 'b) = emitter obj ~name:sgn.name external emit_none : 'a obj -> name:string -> unit -> unit = "ml_gtk_signal_emit_none" let emit_unit obj ~sgn = emit obj ~emitter:emit_none ~sgn () external emit_int : 'a obj -> name:string -> int -> unit = "ml_gtk_signal_emit_int" let emit_int = emit ~emitter:emit_int In particular, I don't understand what the type "obj" is, what namespace it's from, and how it relates to an ordinary GWindow. Jeff Henrikson