[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | ξΙΛΟΜΑΚ γΙΠΑΞΟΧ <nicholas@p...> |
| Subject: | self in classes |
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