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 JAA16991 for caml-redistribution; Mon, 8 Feb 1999 09:04:45 +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 TAA16506 for ; Sun, 7 Feb 1999 19:56:35 +0100 (MET) Received: from post.tepkom.ru (relay.tepkom.ru [195.9.240.162]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id TAA09069 for ; Sun, 7 Feb 1999 19:56:34 +0100 (MET) Received: from localhost (nicholas@localhost) by post.tepkom.ru (8.8.7/8.8.7) with ESMTP id RAA14909 for ; Sat, 6 Feb 1999 17:09:55 +0300 Date: Sat, 6 Feb 1999 17:09:54 +0300 (MSK) From: =?KOI8-r?B?7snLz8zByiDjydDBzs/X?= To: Caml list Subject: self in classes Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: weis Hi! Are there any ways to call the methods of other objects with self as an argument ? I mean situation like that: class foo = object (self) val observers : bar list = [] method register = Array.iter (function o -> o#register self ) observers .... ^^^^^^^^^^^^^^^^^^ end class bar = object method register ob = (* add something *) end When i'm trying to write something like that ocamlc says me that self canot escape of it's definition