Content-Type: text/plain; charset="iso-8859-1" From: Stalkern 2 Reply-To: stalkern2 at tin.it To: lablgtk at kaba.or.jp Subject: Re: "ocaml_beginners"::[] LablGTK File Viewer example Date: Wed, 29 Jan 2003 09:31:52 +0100 Cc: ocaml_beginners at yahoogroups.com References: <200301271832.24636.stalkern2 at tin.it> In-Reply-To: <200301271832.24636.stalkern2 at tin.it> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <200301290931.52505.stalkern2 at tin.it> Il Monday 27 January 2003 18:32, Stalkern 2 ha scritto: > I've written a program similar to tree.pl in the GTK-perl tutorial. > > I hope that it will serve as an example of trees in LablGTK. > Cleaner version: http://membres.lycos.fr/ipotesi/OCAML/aLablgtkFileViewerExample_v2.tar.gz Now I've 1.integrated some suggestions, 2.cleaned everything up and 3.rewritten it starting from lablgladecc, i.e. separating completely the life of the gui from the one of the callbacks. In my previous example of fileviewer, I had to spoil the Makefile made by mlglade so to avoid overwriting of the *_interface. I had to do so because I had put the bindings of elements to callbacks in the *_interface file and I didn't want to loose them when re-editing the .glade template. I guess that a subclass enhancing the class in the *_interface file and residing in a separate file (that mlglade won't overwrite) would have also made it, yet the gui+callbacks approach used here looks simpler (although less OOP-like) and closer to the idea that GUIs like this are intended to "dress" command-line applications, not to replace them. Enjoy! Ernesto