caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* classes mutually recursive
@ 2001-01-29 10:15 Sylvain Kerjean
  2001-01-31 16:42 ` Brian Rogoff
  0 siblings, 1 reply; 2+ messages in thread
From: Sylvain Kerjean @ 2001-01-29 10:15 UTC (permalink / raw)
  To: caml-list

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



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

end of thread, other threads:[~2001-01-31 16:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-01-29 10:15 classes mutually recursive Sylvain Kerjean
2001-01-31 16:42 ` Brian Rogoff

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).