Message-ID: <423B9762.5020006 at rftp.com> Date: Fri, 18 Mar 2005 19:07:14 -0800 From: Robert Roessler Organization: Robert's High-performance Software MIME-Version: 1.0 To: lablgtk at math.nagoya-u.ac.jp Subject: Simple marshaller "style" question Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit So, Jacques' "pointer" to GtkSignal.marshal2 was all that was needed to get me a working event system for my LablGTK Scintilla wrapper (BTW, is this a binding, a wrapper, or something else?). However, just using e.g. marshal2 int pointer "sci-notify" puts the callback in the position of needing to transform (into an OCaml record) the Gpointer.boxed option that the pointer is marshalled as... which is certainly usable, but not ideal. OTOH, doing my own complete version of marshal2 just so I can call my "ml_..." function on "arg2" at the very end seems a bit inelegant, but that is what I am doing for the time being. So, given that marshal2 or whatever I do is being used via a "partial application" (I think that is what you types call it) that goes into the GtkSignal.t record, is there a more "HOF style" way of reusing marshal2 but processing the argument(s) *before* the callback is invoked, or is the custom version of marshal2 the best I can do? Robert Roessler robertr@rftp.com http://www.rftp.com