From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id XAA15456; Thu, 16 Sep 2004 23:29:10 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id XAA14757 for ; Thu, 16 Sep 2004 23:29:09 +0200 (MET DST) Received: from mta03-svc.ntlworld.com (mta03-svc.ntlworld.com [62.253.162.43]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id i8GLT9v0019154 for ; Thu, 16 Sep 2004 23:29:09 +0200 Received: from [80.4.70.84] by mta03-svc.ntlworld.com (InterMail vM.4.01.03.37 201-229-121-137-20020806) with ESMTP id <20040916212734.DDYV20874.mta03-svc.ntlworld.com@[80.4.70.84]>; Thu, 16 Sep 2004 22:27:34 +0100 Message-ID: <414A05A5.7080603@ntlworld.com> Date: Thu, 16 Sep 2004 22:29:09 +0100 From: "chris.danx" User-Agent: Mozilla Thunderbird 0.8 (X11/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Richard Jones CC: Caml Mailing List Subject: Re: [Caml-list] WxWidgets? References: <4149F2D0.7040408@ntlworld.com> <20040916202511.GA24789@annexia.org> In-Reply-To: <20040916202511.GA24789@annexia.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 414A05A5.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; ntlworld:99 caml-list:01 2004:99 swig:01 wxpython:01 gui:01 toolkit:01 observations:01 wxwindows:01 wxwindows:01 dialogs:01 dialogs:01 clone:01 python:01 python:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Richard Jones wrote: > On Thu, Sep 16, 2004 at 09:08:48PM +0100, chris.danx wrote: > >>Has anyone made such a binding? If not I was thinking about using swig >>and the wxpython interfaces as the starting point for a wxwidgets >>binding for ocaml. Has anyone tried to do this in the past? Any >>thoughts on the issue? > > I've looked into this in the past, but we ended up using Gtk + > Gtk-Wimp on Windows, which worked quite well. How was that? Choosing WxWidgets instead of Gtk+ was an option I was evaluating (not keen on using gtk+ at all really, it's my least favourite gui toolkit). I might stick with Gtk+ though! It's not like it's a commercial application, it's just for fun and going with Gtk means it will actually be completed. > Here are my observations on going the WxWindows route though: > > (1) WxWindows is pretty good. (Ah, looking at their website, I see > they've renamed it to WxWidgets!). WxWIDGETS is pretty good. It's a > very complete way to develop cross-platform applications. In > particular, it has platform-specific file and print dialogs, which you > won't get if you use Gtk. In fact if you use Gtk you won't get print > dialogs at all - I had to write my own print dialog for Windows which > was no fun at all. Thankfully it's a Tetris clone. No dialogs required. :) I plan to develop something more substantial in Ocaml, but for now I'm just playing with OpenGL and other things. > (2) There seem to be three decent approaches to using WxWidgets under > OCaml: Python, Perl or native. Native is going to be the best, but is > going to take a heck of a lot of effort. > > (3) Python or Perl: it's easiest just to use PyCaml or Perl4Caml to > interface with the Wx* libraries under those languages. I don't see > why you'd want to go through SWIG for this. I wasn't thinking of interfacing to perl or python. Just using the wxWidgets swig interfaces used by wxPython as the start of a binding. I was not sure what kind of effort would be involved in that but from a little experiment just now I realised how much effort it would be... huge. The problem with this approach is that the python stuff has to be filtered down to a managable size which is likely to be more work than starting from scratch. > (4) Native: definitely the best performance and the cleanest approach, > however it's lots of work. (Now of course if you wanted to *hire* > Merjis to do the work, contact me off-list ... :-) If I had the money maybe! :) *checks last nights lottery ticket* ... two numbers and another number just one away for a tenner AGAIN! *sigh* Chris ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners