From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id LAA21160 for caml-red; Wed, 31 Jan 2001 11:58:05 +0100 (MET) 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 LAA07095 for ; Mon, 29 Jan 2001 11:15:40 +0100 (MET) Received: from feu.irisa.fr (feu.irisa.fr [131.254.60.80]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f0TAFdH06557 for ; Mon, 29 Jan 2001 11:15:39 +0100 (MET) Received: from irisa.fr (sigzag.irisa.fr [131.254.12.93]) by feu.irisa.fr (8.9.3/8.9.3) with ESMTP id LAA11037 for ; Mon, 29 Jan 2001 11:15:39 +0100 (MET) Message-ID: <3A7542CB.6731EBDC@irisa.fr> Date: Mon, 29 Jan 2001 11:15:39 +0100 From: Sylvain Kerjean Organization: IRISA, Campus de Beaulieu, 35042 Rennes Cedex, FRANCE X-Mailer: Mozilla 4.76 [en] (X11; U; SunOS 5.7 sun4u) X-Accept-Language: fr, en MIME-Version: 1.0 To: caml-list@inria.fr Subject: classes mutually recursive Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Sender: weis@pauillac.inria.fr I have to program a class A whose method m produces an object of class B,with the property that B inherits from A : class A = ... method m = new B ... end;; class B = ... inherit A ... end;; Of course it leads to a type clash, but as the manual exhibits an example of the observer/notifier problem, if someone could explain me a little more about a trick to get the behaviour i need, it would be very kind !! PS : sorry for my poor english, and no i can not change my architecture of classes cause i interface an existing API (for those who are interested, it is the architecture of the BHandler/BLooper in BeOS) -- Sylvain Kerjean IRISA-INRIA, Campus de Beaulieu, 35042 Rennes cedex, France Tél: +33 (0) 2 99 84 75 99, Fax: +33 (0) 2 99 84 71 71