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 LAA03563; Mon, 14 Jun 2004 11:38:07 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id LAA05769 for ; Mon, 14 Jun 2004 11:38:06 +0200 (MET DST) Received: from aomori.annexia.org (annexia.force9.co.uk [212.56.101.183]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i5E9bxEV018264 for ; Mon, 14 Jun 2004 11:38:03 +0200 Received: from rich by aomori.annexia.org with local (Exim 3.36 #1 (Debian)) id 1BZnuc-00024L-00 for ; Mon, 14 Jun 2004 10:37:54 +0100 Date: Mon, 14 Jun 2004 10:37:54 +0100 Cc: caml-list@inria.fr Subject: Re: [Caml-list] troubles with polymorphic variant in class Message-ID: <20040614093754.GA7925@redhat.com> References: <1087142756.10383.50.camel@Bess> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1087142756.10383.50.camel@Bess> User-Agent: Mutt/1.5.5.1+cvs20040105i From: Richard Jones X-Miltered: at nez-perce with ID 40CD71F7.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 2004:99 widget:01 widget:01 vectors:01 hashes:01 funcs:01 allocator:01 ltd:98 0200,:01 lib:01 lib:01 polymorphic:01 variant:02 father:97 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Sun, Jun 13, 2004 at 06:05:57PM +0200, François-Xavier HOUARD wrote: > So, as every composant can have different type of father, every object > is parametrized by the type of his father, for example, a button in a > panel in a window is, for the moment, typed as > window panel button > as the button class looks like that: > class ['a] button (father:'a) > .... > and the panel too,etc > > I find it nice, cause every widget has got his "genealogic tree" in his > type. I'm probably missing something here, but what's wrong with having every widget just contain an ordinary data item / method pointing to the parent? eg. button#parent == panel ? Rich. -- Richard Jones. http://www.annexia.org/ http://www.j-london.com/ Merjis Ltd. http://www.merjis.com/ - improving website return on investment C2LIB is a library of basic Perl/STL-like types for C. Vectors, hashes, trees, string funcs, pool allocator: http://www.annexia.org/freeware/c2lib/ ------------------- 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