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 LAA28085; Mon, 11 Aug 2003 11:39:04 +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 LAA24247 for ; Mon, 11 Aug 2003 11:39:03 +0200 (MET DST) Received: from mail-in-04.arcor-online.net (mail-in-04.arcor-online.net [151.189.21.44]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h7B9d2f07892 for ; Mon, 11 Aug 2003 11:39:02 +0200 (MET DST) Received: from diebuntekuh.de (dialin-212-144-211-102.arcor-ip.net [212.144.211.102]) by mail-in-04.arcor-online.net (Postfix) with ESMTP id BDACD5A0C6 for ; Mon, 11 Aug 2003 11:39:01 +0200 (CEST) Received: by diebuntekuh.de (Postfix, from userid 500) id BD0BC6066AA; Mon, 11 Aug 2003 11:41:42 +0200 (CEST) To: caml-list@inria.fr Subject: Re: [Caml-list] Re: Tcl/Tk and RH 9 References: <1060394583.12630.4.camel@localhost.localdomain> <200308110215.42114.exa@kablonet.com.tr> <20030811004129.GB32383@swordfish> <200308110420.53523.exa@kablonet.com.tr> From: Christoph Bauer In-Reply-To: <200308110420.53523.exa@kablonet.com.tr> (Eray Ozkural's message of "Mon, 11 Aug 2003 04:20:53 +0300") User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux) Date: Mon, 11 Aug 2003 11:41:42 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Loop: caml-list@inria.fr X-Spam: no; 0.00; bauer:01 caml-list:01 eray:01 ozkural:01 gui:01 toolkit:01 generic:01 no-brainer:99 lablgtk:01 camlp:01 callback:01 gmain:01 widget:01 foreach:01 expr:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Eray Ozkural writes: > It is now going to sound "bold" to you people, but I don't understand why you > can't write the ultimate portable GUI toolkit in ocaml itself. With a > language as generic as ocaml it should be a no-brainer to efficiently > abstract over peculiarities of windows systems. It's just too boring to create another platform independent GUI toolkit. What about to extend lablgtk through camlp4 quotations so that something like the following line is possible: let window = << Button ~label:"Quit" ~callback:GMain.Main.quit >> (equivalent to Tcl/Tk code: pack [button .b -text Quit -command quit]) or let editor_window = << VBox [Menu ["File" ["Open" ~callback:open; "Save" ~callback:save]; "Help" ["About" ~callback:about]]; text = Text ~width:80 ~height:24; HBox [Button ~label:"Open" ~callback:open; Button ~label:quit ~callback:Main.quit]] >> The Camlp4 had to * create implizit the window widget * generate unused symbols (like the button name) but export the widget "text" * generate packing (vbox#add) Such code is better to maintain and it needs less time to write. What do you think? Regards, Christoph -- proc self {} {foreach c [split [info body self] ""] d {14 -7 0 0 4 -67 4 73 11 69 24 -83 -15 6 -4 -84 78 20 11 -78 -1 -1 79 19 -8 4} { binary scan $c c c if {[catch {append r [format %c [expr $c+$d]]}]} {return $r};}};puts [self] ------------------- 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