Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
* self in classes
@ 1999-02-06 14:09 Николай Ципанов
  1999-02-08 10:34 ` Didier Remy
  1999-02-08 12:21 ` Jerome Vouillon
  0 siblings, 2 replies; 3+ messages in thread
From: Николай Ципанов @ 1999-02-06 14:09 UTC (permalink / raw)
  To: Caml list


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 




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1999-02-08 14:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-02-06 14:09 self in classes Николай Ципанов
1999-02-08 10:34 ` Didier Remy
1999-02-08 12:21 ` Jerome Vouillon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox