Delivered-To: garrigue at math.nagoya-u.ac.jp Authentication-Results: mailhost.math.nagoya-u.ac.jp sender=lablgtk-list-bounces at lists.forge.ocamlcore.org; domainkey=neutral (no query protocol specified; no policy for lists.forge.ocamlcore.org) Delivered-To: lablgtk-list at smtp.ocamlcore.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to:x-mailer; bh=Bht0/46dljWUUxg1ruB6upZMsVfcaLVgkrdq9alYitY=; b=YyTh1epE4+KaN6filJ/hOK7vMgQAPkgJNHo3G/zPo0xx+LVuLfbrNFx78tUbwREBvE 2k4jThivq/35Ffe8eHWWl2mlsDKa2Oe7bU1ZlaXB2SU56+PdyuA+AtUzPXgjXVTeWpTR aylbYkKTeq8w+tkm1p8PIyIohezJtQiLmdgQY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=fXWnyLF98tz5Lzp24kcxPLHn+LQ0YvO6ReBMa58POwYHaQeg/jhY25EjJ1BWuDxKaO 4XBGghIEqaVLiyKLPVwddNFyfjk4XKFV8AcnU1WWDHkxCxUiUxz5dpEH9Gg5hIfxPp/L WTi3S2clBzzjFYcUyqdUo9e46cFV1sHJOKlKk= Mime-Version: 1.0 (Apple Message framework v1084) From: Jacques Garrigue In-Reply-To: <1BD26E40-E297-43DF-B3E6-3F3E685DC7C2 at philou.ch> Date: Wed, 30 Mar 2011 09:20:01 +0900 Message-Id: <8499E6DB-C655-48B4-AED6-601EFD1565C4 at math.nagoya-u.ac.jp> References: <1BD26E40-E297-43DF-B3E6-3F3E685DC7C2 at philou.ch> To: Philippe Strauss Cc: lablgtk-list at lists.forge.ocamlcore.org Subject: Re: [Lablgtk-list] taking the full OO approach Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On 2011/03/30, at 0:50, Philippe Strauss wrote: > Hello lablgtk users, > > How do I write lablgtk code to be able to reuse some assembly of widgets multiple times in my app, until now I've used a lot the functional closure between class and object keyword to express my GUI and pack it, but it only works fine at the toplevel or if you use this class only once in your whole app. You may have look at the IRC client in applications/camlirc of the lablgtk source distribution. It tries to do things in a reasonably modular way. To allow repacking components, one just adds a ?packing argument, which is forwarded to the most external container inside your component. To allow communication between components, you can use the ML signal framework provided by GUtil.ml_signal. Jacques Garrigue _______________________________________________ Lablgtk-list mailing list Lablgtk-list@lists.forge.ocamlcore.org https://lists.ocamlcore.org/cgi-bin/listinfo/lablgtk-list